blob: b1716e49369b21cae4bd425ca133239c17cbf8f8 [file] [log] [blame]
kj52dfb132018-03-27 15:50:39 +03001# 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" . }}
kj52dfb132018-03-27 15:50:39 +030019 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 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000025# annotations:
26# service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
kj52dfb132018-03-27 15:50:39 +030027spec:
28 type: {{ .Values.service.type }}
29 ports:
30 {{if eq .Values.service.type "NodePort" -}}
31 - port: {{ .Values.service.externalPort }}
32 #Example internal target port if required
33 #targetPort: {{ .Values.service.internalPort }}
34 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000035 name: {{ .Values.service.portName }}
kj52dfb132018-03-27 15:50:39 +030036 - port: {{ .Values.service.externalPort2 }}
37 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000038 name: {{ .Values.service.portName }}2
kj52dfb132018-03-27 15:50:39 +030039 - port: {{ .Values.service.externalPort3 }}
40 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000041 name: {{ .Values.service.portName }}3
kj52dfb132018-03-27 15:50:39 +030042 - port: {{ .Values.service.externalPort4 }}
43 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000044 name: {{ .Values.service.portName }}4
kj52dfb132018-03-27 15:50:39 +030045 {{- else -}}
46 - port: {{ .Values.service.externalPort }}
47 targetPort: {{ .Values.service.internalPort }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000048 name: {{ .Values.service.portName }}
kj52dfb132018-03-27 15:50:39 +030049 - port: {{ .Values.service.externalPort2 }}
50 targetPort: {{ .Values.service.internalPort2 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000051 name: {{ .Values.service.portName }}2
kj52dfb132018-03-27 15:50:39 +030052 - port: {{ .Values.service.externalPort3 }}
53 targetPort: {{ .Values.service.internalPort3 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000054 name: {{ .Values.service.portName }}3
kj52dfb132018-03-27 15:50:39 +030055 - port: {{ .Values.service.externalPort4 }}
56 targetPort: {{ .Values.service.internalPort4 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000057 name: {{ .Values.service.portName }}4
kj52dfb132018-03-27 15:50:39 +030058 {{- end}}
59 selector:
60 app: {{ include "common.name" . }}
61 release: {{ .Release.Name }}
62 clusterIP: None