blob: d2136ccb0b6ebb2493cdfa5eb7dd530cdf4e2901 [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 "+" "_" }}
23 release: {{ .Release.Name }}
24 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:
38 type: {{ .Values.service.type }}
39 ports:
40 {{if eq .Values.service.type "NodePort" -}}
41 - port: {{ .Values.service.externalPort }}
42 targetPort: {{ .Values.service.internalPort }}
Agarwal, Ruchira (ra1926)ec7c75e2019-10-01 17:36:24 +000043 {{ if not .Values.global.aafEnabled }}
44 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
45 {{ end }}
BorislavG1ffbd992018-04-24 07:56:27 +000046 name: "{{ .Values.service.portName }}-8282"
jmac065e2ce2018-03-29 01:18:02 +000047 - port: {{ .Values.service.externalPort2 }}
48 targetPort: {{ .Values.service.internalPort2 }}
BorislavG1ffbd992018-04-24 07:56:27 +000049 name: "{{ .Values.service.portName }}-8202"
jmac065e2ce2018-03-29 01:18:02 +000050 - port: {{ .Values.service.externalPort3 }}
51 targetPort: {{ .Values.service.internalPort3 }}
52 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
BorislavG1ffbd992018-04-24 07:56:27 +000053 name: "{{ .Values.service.portName }}-8280"
jmaca68f4cb2018-05-10 22:44:19 +000054 - port: {{ .Values.service.externalPort4 }}
55 targetPort: {{ .Values.service.internalPort4 }}
Agarwal, Ruchira (ra1926)ec7c75e2019-10-01 17:36:24 +000056 {{ if .Values.global.aafEnabled }}
jmaca68f4cb2018-05-10 22:44:19 +000057 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
Agarwal, Ruchira (ra1926)ec7c75e2019-10-01 17:36:24 +000058 {{ end }}
jmaca68f4cb2018-05-10 22:44:19 +000059 name: "{{ .Values.service.portName }}-8443"
jmac065e2ce2018-03-29 01:18:02 +000060 {{- else -}}
61 - port: {{ .Values.service.externalPort }}
62 targetPort: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000063 name: {{ .Values.service.portName }}
jmac065e2ce2018-03-29 01:18:02 +000064 {{- end}}
65 selector:
66 app: {{ include "common.name" . }}
67 release: {{ .Release.Name }}
68---
69apiVersion: v1
70kind: Service
71metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000072 name: {{ .Values.service.portName }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000073 namespace: {{ include "common.namespace" . }}
74 labels:
75 app: {{ include "common.name" . }}
76 release: {{ .Release.Name }}
77 annotations:
78 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
79spec:
80 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000081 - name: "{{ .Values.service.portName }}-cluster-port"
jmac065e2ce2018-03-29 01:18:02 +000082 port: {{ .Values.service.clusterPort }}
83 clusterIP: None
84 selector:
85 app: {{ include "common.name" . }}
86 release: {{ .Release.Name }}
87 sessionAffinity: None
88 type: ClusterIP
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -040089
Trevor Tait567ff1e2018-05-01 16:20:54 -040090{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -040091---
92apiVersion: v1
93kind: Service
94metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000095 name: sdnhost-{{ include "common.servicename" . }}-0
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -040096 namespace: {{ .Release.Namespace }}
97 labels:
98 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
99spec:
100 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000101 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400102 port: {{ .Values.service.clusterPort2 }}
103 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000104 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000105 - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400106 port: {{ .Values.service.clusterPort3 }}
107 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000108 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400109 type: NodePort
110 selector:
111 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
112{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400113{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400114---
115apiVersion: v1
116kind: Service
117metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000118 name: sdnhost-{{ include "common.servicename" . }}-1
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400119 namespace: {{ .Release.Namespace }}
120 labels:
121 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
122spec:
123 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000124 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400125 port: {{ .Values.service.clusterPort2 }}
126 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000127 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000128 - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400129 port: {{ .Values.service.clusterPort3 }}
130 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000131 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400132 type: NodePort
133 selector:
134 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
135{{ end }}
Trevor Tait567ff1e2018-05-01 16:20:54 -0400136{{ if .Values.config.geoEnabled }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400137---
138apiVersion: v1
139kind: Service
140metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000141 name: sdnhost-{{ include "common.servicename" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400142 namespace: {{ .Release.Namespace }}
143 labels:
144 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
145spec:
146 ports:
BorislavG1ffbd992018-04-24 07:56:27 +0000147 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400148 port: {{ .Values.service.clusterPort2 }}
149 targetPort: {{ .Values.service.internalPort4 }}
jmac0e4f7172018-09-07 18:06:43 +0000150 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }}
BorislavG1ffbd992018-04-24 07:56:27 +0000151 - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400152 port: {{ .Values.service.clusterPort3 }}
153 targetPort: {{ .Values.service.internalPort }}
jmac0e4f7172018-09-07 18:06:43 +0000154 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400155 type: NodePort
156 selector:
157 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
Mohammadreza Pasandidehb756fb72018-04-03 10:06:45 -0400158{{ end }}