blob: 0bbda1a364796b2c0086807b82370765e3a69eae [file] [log] [blame]
jmac065e2ce2018-03-29 01:18:02 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: v1
16kind: Service
17metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000018 name: {{ include "common.servicename" . }}
jmac065e2ce2018-03-29 01:18:02 +000019 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010023 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000024 heritage: {{ .Release.Service }}
25 annotations:
26 msb.onap.org/service-info: '[
27 {
28 "serviceName": "sdnc",
29 "version": "v1",
30 "url": "/",
31 "protocol": "REST",
32 "port": "{{ .Values.service.externalPort }}",
33 "visualRange":"1",
34 "path": "/"
35 }
36 ]'
37spec:
Dan Timoney7c29ad02020-03-17 11:41:16 -040038 type: NodePort
jmac065e2ce2018-03-29 01:18:02 +000039 ports:
Dan Timoney7c29ad02020-03-17 11:41:16 -040040 - name: "{{ .Values.service.portName }}-restconf"
Agarwal, Ruchira (ra1926)ec7c75e2019-10-01 17:36:24 +000041 {{ if not .Values.global.aafEnabled }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040042 port: {{ .Values.service.externalPort }}
jmac065e2ce2018-03-29 01:18:02 +000043 targetPort: {{ .Values.service.internalPort }}
Dan Timoney7c29ad02020-03-17 11:41:16 -040044 {{- else -}}
45 port: {{ .Values.service.externalPort4 }}
46 targetPort: {{ .Values.service.internalPort4 }}
47 {{ end }}
48 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
49 selector:
50 app: {{ include "common.name" . }}
51 release: {{ include "common.release" . }}
52---
53apiVersion: v1
54kind: Service
55metadata:
56 name: "{{ .Values.service.name }}-oam"
57 namespace: {{ include "common.namespace" . }}
58 labels:
59 app: {{ include "common.name" . }}
60 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
61 release: {{ include "common.release" . }}
62 heritage: {{ .Release.Service }}
63spec:
64 type: ClusterIP
65 ports:
66 - name: "{{ .Values.service.portName }}-restconf-alt"
67 {{ if .Values.global.aafEnabled }}
68 port: {{ .Values.service.externalPort }}
69 targetPort: {{ .Values.service.internalPort }}
70 {{- else -}}
71 port: {{ .Values.service.internalPort4 }}
72 target: {{ .Values.service.internalPort4 }}
73 {{ end }}
74 - name: "{{ .Values.service.portName }}-karaf"
75 port: {{ .Values.service.externalPort2 }}
76 targetPort: {{ .Values.service.internalPort2 }}
jmac065e2ce2018-03-29 01:18:02 +000077 selector:
78 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010079 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000080---
81apiVersion: v1
82kind: Service
83metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000084 name: {{ .Values.service.portName }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000085 namespace: {{ include "common.namespace" . }}
86 labels:
87 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010088 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000089 annotations:
90 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
91spec:
92 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000093 - name: "{{ .Values.service.portName }}-cluster-port"
jmac065e2ce2018-03-29 01:18:02 +000094 port: {{ .Values.service.clusterPort }}
95 clusterIP: None
96 selector:
97 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010098 release: {{ include "common.release" . }}
jmac065e2ce2018-03-29 01:18:02 +000099 sessionAffinity: None
100 type: ClusterIP
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400101
Trevor Tait567ff1e2018-05-01 16:20:54 -0400102{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400103---
104apiVersion: v1
105kind: Service
106metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000107 name: sdnhost-{{ include "common.servicename" . }}-0
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400108 namespace: {{ .Release.Namespace }}
109 labels:
110 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
111spec:
112 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000113 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400114 port: {{ .Values.service.clusterPort2 }}
115 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000116 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000117 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400118 port: {{ .Values.service.clusterPort3 }}
119 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000120 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400121 type: NodePort
122 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:
133 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
134spec:
135 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000136 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400137 port: {{ .Values.service.clusterPort2 }}
138 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000139 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000140 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400141 port: {{ .Values.service.clusterPort3 }}
142 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000143 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400144 type: NodePort
145 selector:
146 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
147{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400148{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400149---
150apiVersion: v1
151kind: Service
152metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000153 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400154 namespace: {{ .Release.Namespace }}
155 labels:
156 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.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400160 port: {{ .Values.service.clusterPort2 }}
161 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000162 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000163 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400164 port: {{ .Values.service.clusterPort3 }}
165 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000166 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400167 type: NodePort
168 selector:
169 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400170{{ end }}