blob: f0d1bbb3c78f022ddab6cb12a10dc806208c7aba [file] [log] [blame]
Jakub Latusekdf233a82020-10-21 13:36:29 +02001{{/*
Jack Lucasb92fe602018-04-20 18:51:34 +00002#============LICENSE_START========================================================
3# ================================================================================
4# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
Durgpal7ad40692018-08-03 07:28:36 +00005# Modifications Copyright © 2018 Amdocs, Bell Canada
Jack Lucasb92fe602018-04-20 18:51:34 +00006# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18# ============LICENSE_END=========================================================
Jakub Latusekdf233a82020-10-21 13:36:29 +020019*/}}
Jack Lucasb92fe602018-04-20 18:51:34 +000020
21apiVersion: v1
22kind: Service
23metadata:
24 name: {{ include "common.servicename" . }}
25 namespace: {{ include "common.namespace" . }}
26 labels:
27 app: {{ include "common.name" . }}
28 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010029 release: {{ include "common.release" . }}
Jack Lucasb92fe602018-04-20 18:51:34 +000030 heritage: {{ .Release.Service }}
31spec:
32 type: {{ .Values.service.type }}
33 ports:
34 {{if eq .Values.service.type "NodePort" -}}
35 - port: {{ .Values.service.externalPort }}
36 #Example internal target port if required
37 #targetPort: {{ .Values.service.internalPort }}
38 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
39 name: {{ .Values.service.name }}
40 {{- else -}}
41 - port: {{ .Values.service.externalPort }}
42 targetPort: {{ .Values.service.internalPort }}
43 name: {{ .Values.service.name }}
44 {{- end}}
45 selector:
46 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010047 release: {{ include "common.release" . }}