blob: 741a15ae5355534c456e91c71d890738b825f4eb [file] [log] [blame]
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +01001{{/*
jmac065e2ce2018-03-29 01:18:02 +00002# Copyright © 2017 Amdocs, Bell Canada
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010015*/}}
jmac065e2ce2018-03-29 01:18:02 +000016
17apiVersion: v1
18kind: Service
19metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000020 name: {{ include "common.servicename" . }}
jmac065e2ce2018-03-29 01:18:02 +000021 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000026 heritage: {{ .Release.Service }}
27 annotations:
28 msb.onap.org/service-info: '[
29 {
30 "serviceName": "sdnc",
31 "version": "v1",
32 "url": "/",
33 "protocol": "REST",
34 "port": "{{ .Values.service.externalPort }}",
35 "visualRange":"1",
36 "path": "/"
37 }
38 ]'
39spec:
Dan Timoney7c29ad02020-03-17 11:41:16 -040040 type: NodePort
jmac065e2ce2018-03-29 01:18:02 +000041 ports:
Dan Timoney7c29ad02020-03-17 11:41:16 -040042 - name: "{{ .Values.service.portName }}-restconf"
Agarwal, Ruchira (ra1926)ec7c75e2019-10-01 17:36:24 +000043 {{ if not .Values.global.aafEnabled }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040044 port: {{ .Values.service.externalPort }}
jmac065e2ce2018-03-29 01:18:02 +000045 targetPort: {{ .Values.service.internalPort }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040046 {{- else -}}
47 port: {{ .Values.service.externalPort4 }}
48 targetPort: {{ .Values.service.internalPort4 }}
49 {{ end }}
50 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
51 selector:
52 app: {{ include "common.name" . }}
53 release: {{ include "common.release" . }}
54---
55apiVersion: v1
56kind: Service
57metadata:
58 name: "{{ .Values.service.name }}-oam"
59 namespace: {{ include "common.namespace" . }}
60 labels:
61 app: {{ include "common.name" . }}
62 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
63 release: {{ include "common.release" . }}
64 heritage: {{ .Release.Service }}
65spec:
66 type: ClusterIP
67 ports:
68 - name: "{{ .Values.service.portName }}-restconf-alt"
69 {{ if .Values.global.aafEnabled }}
70 port: {{ .Values.service.externalPort }}
71 targetPort: {{ .Values.service.internalPort }}
72 {{- else -}}
73 port: {{ .Values.service.internalPort4 }}
74 target: {{ .Values.service.internalPort4 }}
75 {{ end }}
76 - name: "{{ .Values.service.portName }}-karaf"
77 port: {{ .Values.service.externalPort2 }}
78 targetPort: {{ .Values.service.internalPort2 }}
jmac065e2ce2018-03-29 01:18:02 +000079 selector:
80 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010081 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000082---
83apiVersion: v1
84kind: Service
85metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000086 name: {{ .Values.service.portName }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000087 namespace: {{ include "common.namespace" . }}
88 labels:
89 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010090 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000091 annotations:
92 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
93spec:
94 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000095 - name: "{{ .Values.service.portName }}-cluster-port"
jmac065e2ce2018-03-29 01:18:02 +000096 port: {{ .Values.service.clusterPort }}
97 clusterIP: None
98 selector:
99 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100100 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +0000101 sessionAffinity: None
102 type: ClusterIP
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400103
Trevor Tait567ff1e2018-05-01 16:20:54 -0400104{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400105---
106apiVersion: v1
107kind: Service
108metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000109 name: sdnhost-{{ include "common.servicename" . }}-0
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400110 namespace: {{ .Release.Namespace }}
111 labels:
112 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
113spec:
114 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000115 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400116 port: {{ .Values.service.clusterPort2 }}
117 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000118 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000119 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400120 port: {{ .Values.service.clusterPort3 }}
121 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000122 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400123 type: NodePort
124 selector:
125 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
126{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400127{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400128---
129apiVersion: v1
130kind: Service
131metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000132 name: sdnhost-{{ include "common.servicename" . }}-1
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400133 namespace: {{ .Release.Namespace }}
134 labels:
135 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
136spec:
137 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000138 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400139 port: {{ .Values.service.clusterPort2 }}
140 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000141 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000142 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400143 port: {{ .Values.service.clusterPort3 }}
144 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000145 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400146 type: NodePort
147 selector:
148 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
149{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400150{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400151---
152apiVersion: v1
153kind: Service
154metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000155 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400156 namespace: {{ .Release.Namespace }}
157 labels:
158 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
159spec:
160 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000161 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400162 port: {{ .Values.service.clusterPort2 }}
163 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000164 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000165 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400166 port: {{ .Values.service.clusterPort3 }}
167 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000168 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400169 type: NodePort
170 selector:
171 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400172{{ end }}