blob: 8f30164fec122f2c838c32c417d57efad29d4a76 [file] [log] [blame]
Jakub Latuseka6d04ad2020-10-21 13:26:45 +02001{{/*
Kiran Kamineni39648722018-03-21 14:58:11 -07002# Copyright 2018 Intel Corporation, Inc
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Jakub Latuseka6d04ad2020-10-21 13:26:45 +020015*/}}
Kiran Kamineni39648722018-03-21 14:58:11 -070016
17apiVersion: v1
18kind: Service
19metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000020 name: {{ include "common.servicename" . }}
Kiran Kamineni39648722018-03-21 14:58:11 -070021 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.fullname" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
Kiran Kamineni39648722018-03-21 14:58:11 -070026 heritage: {{ .Release.Service }}
27spec:
28 type: {{ .Values.service.type }}
29 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000030 - name: {{ .Values.service.PortName }}
Kiran Kamineni39648722018-03-21 14:58:11 -070031 {{if eq .Values.service.type "NodePort" -}}
32 port: {{ .Values.service.internalPort }}
Instrumental0c7bc942019-08-06 16:36:13 -050033 nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
Kiran Kamineni39648722018-03-21 14:58:11 -070034 {{- else -}}
35 port: {{ .Values.service.externalPort }}
36 targetPort: {{ .Values.service.internalPort }}
37 {{- end}}
38 protocol: TCP
39 selector:
40 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010041 release: {{ include "common.release" . }}