blob: 08feb5a6edf6011121445f486442eaebd60d91b0 [file] [log] [blame]
Jakub Latusekd8eaff62020-10-21 13:36:29 +02001{{/*
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Copyright © 2018 ZTE
3# Modifications Copyright © 2018 AT&T, Amdocs, Bell Canada
priyanshua1b061392018-05-29 12:50:14 +05304# 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 Latusekd8eaff62020-10-21 13:36:29 +020015*/}}
priyanshua1b061392018-05-29 12:50:14 +053016
17apiVersion: v1
18kind: Service
19metadata:
20 name: {{ include "common.servicename" . }}
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
priyanshua1b061392018-05-29 12:50:14 +053026 heritage: {{ .Release.Service }}
priyanshu3af9db62018-08-16 16:23:52 +053027 annotations:
28 msb.onap.org/service-info: '[
29 {
30 "serviceName": "wf-gui",
31 "version": "v1",
32 "url": "/",
33 "protocol": "UI",
othman touijer2b764d02022-01-05 14:40:37 +010034 "port": "{{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}",
priyanshu3af9db62018-08-16 16:23:52 +053035 "visualRange":"0|1"
36 }
37 ]'
priyanshua1b061392018-05-29 12:50:14 +053038spec:
39 type: {{ .Values.service.type }}
40 ports:
41 {{if eq .Values.service.type "NodePort" -}}
othman touijer2b764d02022-01-05 14:40:37 +010042 - port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
priyanshua1b061392018-05-29 12:50:14 +053043 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
othman touijer2b764d02022-01-05 14:40:37 +010044 name: {{ .Values.service.portName }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
priyanshua1b061392018-05-29 12:50:14 +053045 {{- else -}}
othman touijer2b764d02022-01-05 14:40:37 +010046 - port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.externalPort2 .Values.service.externalPort }}
47 targetPort: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
48 name: {{ .Values.service.portName }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
priyanshua1b061392018-05-29 12:50:14 +053049 {{- end}}
50 selector:
51 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010052 release: {{ include "common.release" . }}