blob: 3490dff9ab81e366b45beb74ab53d0463e02c4de [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:
Andreas Geissler2af50792023-03-27 17:11:27 +020041 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
jmac065e2ce2018-03-29 01:18:02 +000042 ports:
Dan Timoney7c29ad02020-03-17 11:41:16 -040043 - name: "{{ .Values.service.portName }}-restconf"
Dan Timoney7c29ad02020-03-17 11:41:16 -040044 port: {{ .Values.service.externalPort }}
jmac065e2ce2018-03-29 01:18:02 +000045 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +020046 {{ if not (include "common.ingressEnabled" .) }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040047 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
Andreas Geissler2af50792023-03-27 17:11:27 +020048 {{ end }}
Jakub Latusek44a4b7e2020-09-25 10:47:01 +020049 {{ if .Values.config.sdnr.enabled }}
50 sessionAffinity: ClientIP
51 {{ end }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040052 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000053 app.kubernetes.io/name: {{ include "common.name" . }}
54 app.kubernetes.io/instance: {{ include "common.release" . }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040055---
56apiVersion: v1
57kind: Service
58metadata:
59 name: "{{ .Values.service.name }}-oam"
60 namespace: {{ include "common.namespace" . }}
61 labels:
62 app: {{ include "common.name" . }}
63 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
64 release: {{ include "common.release" . }}
65 heritage: {{ .Release.Service }}
66spec:
67 type: ClusterIP
68 ports:
69 - name: "{{ .Values.service.portName }}-restconf-alt"
Dan Timoney7c29ad02020-03-17 11:41:16 -040070 port: {{ .Values.service.externalPort }}
71 targetPort: {{ .Values.service.internalPort }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040072 - name: "{{ .Values.service.portName }}-karaf"
73 port: {{ .Values.service.externalPort2 }}
74 targetPort: {{ .Values.service.internalPort2 }}
jmac065e2ce2018-03-29 01:18:02 +000075 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000076 app.kubernetes.io/name: {{ include "common.name" . }}
77 app.kubernetes.io/instance: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000078---
79apiVersion: v1
80kind: Service
81metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000082 name: {{ .Values.service.portName }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000083 namespace: {{ include "common.namespace" . }}
84 labels:
85 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010086 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000087 annotations:
88 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
89spec:
90 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000091 - name: "{{ .Values.service.portName }}-cluster-port"
jmac065e2ce2018-03-29 01:18:02 +000092 port: {{ .Values.service.clusterPort }}
93 clusterIP: None
94 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000095 app.kubernetes.io/name: {{ include "common.name" . }}
96 app.kubernetes.io/instance: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000097 sessionAffinity: None
98 type: ClusterIP
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -040099
Trevor Tait567ff1e2018-05-01 16:20:54 -0400100{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400101---
102apiVersion: v1
103kind: Service
104metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000105 name: sdnhost-{{ include "common.servicename" . }}-0
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400106 namespace: {{ .Release.Namespace }}
107 labels:
108 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
109spec:
110 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000111 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400112 port: {{ .Values.service.clusterPort3 }}
113 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200114 {{ if not (include "common.ingressEnabled" .) }}
jmac0e4f7172018-09-07 18:06:43 +0000115 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200116 {{ end }}
117 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400118 selector:
119 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
120{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400121{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400122---
123apiVersion: v1
124kind: Service
125metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000126 name: sdnhost-{{ include "common.servicename" . }}-1
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400127 namespace: {{ .Release.Namespace }}
128 labels:
129 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
130spec:
131 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000132 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400133 port: {{ .Values.service.clusterPort3 }}
134 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200135 {{ if not (include "common.ingressEnabled" .) }}
jmac0e4f7172018-09-07 18:06:43 +0000136 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200137 {{ end }}
138 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400139 selector:
140 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
141{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400142{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400143---
144apiVersion: v1
145kind: Service
146metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000147 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400148 namespace: {{ .Release.Namespace }}
149 labels:
150 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
151spec:
152 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000153 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400154 port: {{ .Values.service.clusterPort3 }}
155 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200156 {{ if not (include "common.ingressEnabled" .) }}
jmac0e4f7172018-09-07 18:06:43 +0000157 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200158 {{ end }}
159 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400160 selector:
161 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400162{{ end }}
demskeq827854662021-04-08 14:49:47 +0200163
164{{ if .Values.config.sdnr.netconfCallHome.enabled }}
165---
166apiVersion: v1
167kind: Service
168metadata:
169 name: {{ include "common.servicename" . }}-callhome
170 namespace: {{ include "common.namespace" . }}
171 labels:
172 app: {{ include "common.name" . }}
173 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
174 release: {{ include "common.release" . }}
175 heritage: {{ .Release.Service }}
176spec:
Andreas Geissler2af50792023-03-27 17:11:27 +0200177 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
demskeq827854662021-04-08 14:49:47 +0200178 ports:
179 - name: "{{ .Values.service.portName }}-callhome"
180 port: {{ .Values.service.callHomePort }}
181 targetPort: {{ .Values.service.callHomePort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200182 {{ if not (include "common.ingressEnabled" .) }}
demskeq827854662021-04-08 14:49:47 +0200183 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200184 {{ end }}
demskeq827854662021-04-08 14:49:47 +0200185 selector:
186 app.kubernetes.io/name: {{ include "common.name" . }}
187 app.kubernetes.io/instance: {{ include "common.release" . }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200188{{ end }}