blob: 052cfe16ad6c1fc9de828558aea264adccf3f7ce [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 }}
demskeq895bf73a2023-05-09 12:31:07 +000050 - name: "{{ .Values.service.portName }}-sdnrwebsocket"
51 port: {{ .Values.service.sdnrWebsocketPort | default "8182" }}
52 targetPort: {{ .Values.service.sdnrWebsocketPort }}
Jakub Latusek44a4b7e2020-09-25 10:47:01 +020053 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:
AndrewLamb7709c172023-05-12 15:37:14 +0100111 app: sdnhost-{{ include "common.name" . }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400112 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.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400116 port: {{ .Values.service.clusterPort3 }}
117 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200118 {{ if not (include "common.ingressEnabled" .) }}
jmac0e4f7172018-09-07 18:06:43 +0000119 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200120 {{ end }}
121 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400122 selector:
123 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
124{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400125{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400126---
127apiVersion: v1
128kind: Service
129metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000130 name: sdnhost-{{ include "common.servicename" . }}-1
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400131 namespace: {{ .Release.Namespace }}
132 labels:
AndrewLamb7709c172023-05-12 15:37:14 +0100133 app: sdnhost-{{ include "common.name" . }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400134 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.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400138 port: {{ .Values.service.clusterPort3 }}
139 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200140 {{ if not (include "common.ingressEnabled" .) }}
jmac0e4f7172018-09-07 18:06:43 +0000141 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200142 {{ end }}
143 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400144 selector:
145 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
146{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400147{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400148---
149apiVersion: v1
150kind: Service
151metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000152 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400153 namespace: {{ .Release.Namespace }}
154 labels:
AndrewLamb7709c172023-05-12 15:37:14 +0100155 app: sdnhost-{{ include "common.name" . }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400156 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
157spec:
158 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000159 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400160 port: {{ .Values.service.clusterPort3 }}
161 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200162 {{ if not (include "common.ingressEnabled" .) }}
jmac0e4f7172018-09-07 18:06:43 +0000163 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200164 {{ end }}
165 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400166 selector:
167 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400168{{ end }}
demskeq827854662021-04-08 14:49:47 +0200169
170{{ if .Values.config.sdnr.netconfCallHome.enabled }}
171---
172apiVersion: v1
173kind: Service
174metadata:
175 name: {{ include "common.servicename" . }}-callhome
176 namespace: {{ include "common.namespace" . }}
177 labels:
178 app: {{ include "common.name" . }}
179 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
180 release: {{ include "common.release" . }}
181 heritage: {{ .Release.Service }}
182spec:
Andreas Geissler2af50792023-03-27 17:11:27 +0200183 type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
demskeq827854662021-04-08 14:49:47 +0200184 ports:
185 - name: "{{ .Values.service.portName }}-callhome"
186 port: {{ .Values.service.callHomePort }}
187 targetPort: {{ .Values.service.callHomePort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200188 {{ if not (include "common.ingressEnabled" .) }}
demskeq827854662021-04-08 14:49:47 +0200189 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }}
Andreas Geissler2af50792023-03-27 17:11:27 +0200190 {{ end }}
demskeq827854662021-04-08 14:49:47 +0200191 selector:
192 app.kubernetes.io/name: {{ include "common.name" . }}
193 app.kubernetes.io/instance: {{ include "common.release" . }}
demskeq895bf73a2023-05-09 12:31:07 +0000194{{ end }}