blob: cf4655361d0bc2e766a2aa99cdab2e9996fd40f6 [file] [log] [blame]
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +01001{{/*
Sylvain Desbureaux70070412020-11-09 21:58:48 +01002#
3# ============LICENSE_START=======================================================
4# org.onap.aai
5# ================================================================================
6# Copyright © 2018 AT&T Intellectual Property. All rights reserved.
Sylvain Desbureauxc57b58d2021-02-23 18:07:34 +01007# Modifications Copyright © 2021 Orange
Sylvain Desbureaux70070412020-11-09 21:58:48 +01008# ================================================================================
9# Licensed under the Apache License, Version 2.0 (the "License");
10# you may not use this file except in compliance with the License.
11# You may obtain a copy of the License at
12#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS,
17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
20# ============LICENSE_END=========================================================
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +010021*/}}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010022
23apiVersion: v1
24kind: Service
25metadata:
26 name: {{ include "common.servicename" . }}
27 namespace: {{ include "common.namespace" . }}
28 labels:
29 app: {{ include "common.name" . }}
30 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
31 release: {{ include "common.release" . }}
32 heritage: {{ .Release.Service }}
33spec:
34 type: {{ .Values.service.type }}
35 ports:
36 {{if eq .Values.service.type "NodePort" -}}
37 - port: {{ .Values.service.internalPort }}
38 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
osk1146127fd7d82021-06-18 00:51:17 +020039 name: {{ .Values.service.portName }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010040 - port: {{ .Values.service.internalPort2 }}
41 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
42 name: {{ .Values.service.portName2 }}
43 {{- else -}}
44 - port: {{ .Values.service.internalPort }}
osk1146127fd7d82021-06-18 00:51:17 +020045 name: {{ .Values.service.portName }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010046 - port: {{ .Values.service.internalPort2 }}
47 name: {{ .Values.service.portName2 }}
48 {{- end}}
49 selector:
50 app: {{ include "common.name" . }}
51 release: {{ include "common.release" . }}