blob: 1fe4ee3ded072a4e3535ff0fde6695f7161ad7b3 [file] [log] [blame]
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +01001{{/*
jmac065e2ce2018-03-29 01:18:02 +00002# Copyright © 2017 Amdocs, Bell Canada
Alexander Dehn9b797d62020-04-21 09:53:50 +00003# Copyright © 2020 highstreet technologies GmbH
jmac065e2ce2018-03-29 01:18:02 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010016*/}}
jmac065e2ce2018-03-29 01:18:02 +000017
18apiVersion: v1
19kind: Service
20metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000021 name: {{ include "common.servicename" . }}
jmac065e2ce2018-03-29 01:18:02 +000022 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010026 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000027 heritage: {{ .Release.Service }}
28 annotations:
29 msb.onap.org/service-info: '[
30 {
31 "serviceName": "sdnc",
32 "version": "v1",
33 "url": "/",
34 "protocol": "REST",
35 "port": "{{ .Values.service.externalPort }}",
36 "visualRange":"1",
37 "path": "/"
38 }
39 ]'
40spec:
Dan Timoney7c29ad02020-03-17 11:41:16 -040041 type: NodePort
jmac065e2ce2018-03-29 01:18:02 +000042 ports:
Dan Timoney7c29ad02020-03-17 11:41:16 -040043 - name: "{{ .Values.service.portName }}-restconf"
Agarwal, Ruchira (ra1926)ec7c75e2019-10-01 17:36:24 +000044 {{ if not .Values.global.aafEnabled }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040045 port: {{ .Values.service.externalPort }}
jmac065e2ce2018-03-29 01:18:02 +000046 targetPort: {{ .Values.service.internalPort }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040047 {{- else -}}
48 port: {{ .Values.service.externalPort4 }}
49 targetPort: {{ .Values.service.internalPort4 }}
50 {{ end }}
51 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
Jakub Latusek44a4b7e2020-09-25 10:47:01 +020052 {{ if .Values.config.sdnr.enabled }}
53 sessionAffinity: ClientIP
54 {{ end }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040055 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000056 app.kubernetes.io/name: {{ include "common.name" . }}
57 app.kubernetes.io/instance: {{ include "common.release" . }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040058---
59apiVersion: v1
60kind: Service
61metadata:
62 name: "{{ .Values.service.name }}-oam"
63 namespace: {{ include "common.namespace" . }}
64 labels:
65 app: {{ include "common.name" . }}
66 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
67 release: {{ include "common.release" . }}
68 heritage: {{ .Release.Service }}
69spec:
70 type: ClusterIP
71 ports:
72 - name: "{{ .Values.service.portName }}-restconf-alt"
Dan Timoney7c29ad02020-03-17 11:41:16 -040073 port: {{ .Values.service.externalPort }}
74 targetPort: {{ .Values.service.internalPort }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040075 - name: "{{ .Values.service.portName }}-karaf"
76 port: {{ .Values.service.externalPort2 }}
77 targetPort: {{ .Values.service.internalPort2 }}
jmac065e2ce2018-03-29 01:18:02 +000078 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000079 app.kubernetes.io/name: {{ include "common.name" . }}
80 app.kubernetes.io/instance: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000081---
82apiVersion: v1
83kind: Service
84metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000085 name: {{ .Values.service.portName }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000086 namespace: {{ include "common.namespace" . }}
87 labels:
88 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010089 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000090 annotations:
91 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
92spec:
93 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000094 - name: "{{ .Values.service.portName }}-cluster-port"
jmac065e2ce2018-03-29 01:18:02 +000095 port: {{ .Values.service.clusterPort }}
96 clusterIP: None
97 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000098 app.kubernetes.io/name: {{ include "common.name" . }}
99 app.kubernetes.io/instance: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +0000100 sessionAffinity: None
101 type: ClusterIP
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400102
Trevor Tait567ff1e2018-05-01 16:20:54 -0400103{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400104---
105apiVersion: v1
106kind: Service
107metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000108 name: sdnhost-{{ include "common.servicename" . }}-0
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400109 namespace: {{ .Release.Namespace }}
110 labels:
111 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
112spec:
113 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000114 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400115 port: {{ .Values.service.clusterPort2 }}
116 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000117 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000118 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400119 port: {{ .Values.service.clusterPort3 }}
120 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000121 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400122 type: NodePort
123 selector:
124 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
125{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400126{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400127---
128apiVersion: v1
129kind: Service
130metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000131 name: sdnhost-{{ include "common.servicename" . }}-1
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400132 namespace: {{ .Release.Namespace }}
133 labels:
134 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
135spec:
136 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000137 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400138 port: {{ .Values.service.clusterPort2 }}
139 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000140 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000141 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400142 port: {{ .Values.service.clusterPort3 }}
143 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000144 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400145 type: NodePort
146 selector:
147 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
148{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400149{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400150---
151apiVersion: v1
152kind: Service
153metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000154 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400155 namespace: {{ .Release.Namespace }}
156 labels:
157 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
158spec:
159 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000160 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400161 port: {{ .Values.service.clusterPort2 }}
162 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000163 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000164 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400165 port: {{ .Values.service.clusterPort3 }}
166 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000167 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400168 type: NodePort
169 selector:
170 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400171{{ end }}
demskeq827854662021-04-08 14:49:47 +0200172
173{{ if .Values.config.sdnr.netconfCallHome.enabled }}
174---
175apiVersion: v1
176kind: Service
177metadata:
178 name: {{ include "common.servicename" . }}-callhome
179 namespace: {{ include "common.namespace" . }}
180 labels:
181 app: {{ include "common.name" . }}
182 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
183 release: {{ include "common.release" . }}
184 heritage: {{ .Release.Service }}
185spec:
186 type: NodePort
187 ports:
188 - name: "{{ .Values.service.portName }}-callhome"
189 port: {{ .Values.service.callHomePort }}
190 targetPort: {{ .Values.service.callHomePort }}
191 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }}
192 selector:
193 app.kubernetes.io/name: {{ include "common.name" . }}
194 app.kubernetes.io/instance: {{ include "common.release" . }}
195{{ end }}