blob: b434c4025fba58edf95a27f814c140206e8794bb [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 }}
Alexander Dehn9b797d62020-04-21 09:53:50 +000052 {{ if .Values.config.sdnr.enabled }}
53 Session Affinity: 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"
73 {{ if .Values.global.aafEnabled }}
74 port: {{ .Values.service.externalPort }}
75 targetPort: {{ .Values.service.internalPort }}
76 {{- else -}}
77 port: {{ .Values.service.internalPort4 }}
78 target: {{ .Values.service.internalPort4 }}
79 {{ end }}
80 - name: "{{ .Values.service.portName }}-karaf"
81 port: {{ .Values.service.externalPort2 }}
82 targetPort: {{ .Values.service.internalPort2 }}
jmac065e2ce2018-03-29 01:18:02 +000083 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +000084 app.kubernetes.io/name: {{ include "common.name" . }}
85 app.kubernetes.io/instance: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000086---
87apiVersion: v1
88kind: Service
89metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000090 name: {{ .Values.service.portName }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000091 namespace: {{ include "common.namespace" . }}
92 labels:
93 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010094 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000095 annotations:
96 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
97spec:
98 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000099 - name: "{{ .Values.service.portName }}-cluster-port"
jmac065e2ce2018-03-29 01:18:02 +0000100 port: {{ .Values.service.clusterPort }}
101 clusterIP: None
102 selector:
Alexander Dehn9b797d62020-04-21 09:53:50 +0000103 app.kubernetes.io/name: {{ include "common.name" . }}
104 app.kubernetes.io/instance: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +0000105 sessionAffinity: None
106 type: ClusterIP
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400107
Trevor Tait567ff1e2018-05-01 16:20:54 -0400108{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400109---
110apiVersion: v1
111kind: Service
112metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000113 name: sdnhost-{{ include "common.servicename" . }}-0
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400114 namespace: {{ .Release.Namespace }}
115 labels:
116 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
117spec:
118 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000119 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400120 port: {{ .Values.service.clusterPort2 }}
121 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000122 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000123 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400124 port: {{ .Values.service.clusterPort3 }}
125 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000126 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400127 type: NodePort
128 selector:
129 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
130{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400131{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400132---
133apiVersion: v1
134kind: Service
135metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000136 name: sdnhost-{{ include "common.servicename" . }}-1
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400137 namespace: {{ .Release.Namespace }}
138 labels:
139 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
140spec:
141 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000142 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400143 port: {{ .Values.service.clusterPort2 }}
144 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000145 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000146 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400147 port: {{ .Values.service.clusterPort3 }}
148 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000149 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400150 type: NodePort
151 selector:
152 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
153{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400154{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400155---
156apiVersion: v1
157kind: Service
158metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000159 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400160 namespace: {{ .Release.Namespace }}
161 labels:
162 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
163spec:
164 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000165 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400166 port: {{ .Values.service.clusterPort2 }}
167 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000168 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000169 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400170 port: {{ .Values.service.clusterPort3 }}
171 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000172 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400173 type: NodePort
174 selector:
175 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400176{{ end }}