blob: 29c13f97fab9219476685dfbfecbeeccd0702a0b [file] [log] [blame]
toshrajbhardwaj84d73b12018-08-06 07:35:14 +00001# Copyright © 2018 Amdocs, Bell Canada, AT&T
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
kj6a8ce802018-03-19 15:07:44 +020015apiVersion: v1
16kind: Service
17metadata:
BorislavGdd207052018-05-22 11:31:39 +000018 name: {{ include "common.servicename" . }}
kj6a8ce802018-03-19 15:07:44 +020019 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 }}
25spec:
26 ports:
27 {{if eq .Values.service.type "NodePort" -}}
BorislavGdd207052018-05-22 11:31:39 +000028 - name: {{ .Values.service.portName }}
29 port: {{ .Values.service.externalPort }}
kj6a8ce802018-03-19 15:07:44 +020030 targetPort: {{ .Values.service.internalPort }}
31 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
BorislavGdd207052018-05-22 11:31:39 +000032 - name: {{ .Values.service.portName2 }}
33 port: {{ .Values.service.externalPort2 }}
kj6a8ce802018-03-19 15:07:44 +020034 targetPort: {{ .Values.service.internalPort2 }}
35 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
36 {{- else -}}
37 - port: {{ .Values.service.externalPort }}
38 targetPort: {{ .Values.service.internalPort }}
BorislavGdd207052018-05-22 11:31:39 +000039 name: {{ .Values.service.portName }}
kj6a8ce802018-03-19 15:07:44 +020040 - port: {{ .Values.service.externalPort2 }}
41 targetPort: {{ .Values.service.internalPort2 }}
BorislavGdd207052018-05-22 11:31:39 +000042 name: {{ .Values.service.portName }}
kj6a8ce802018-03-19 15:07:44 +020043 {{- end}}
44 type: {{ .Values.service.type }}
45 selector:
46 app: {{ include "common.name" . }}
BorislavGdd207052018-05-22 11:31:39 +000047 clusterIP: {{ .Values.service.aaiServiceClusterIp }}