blob: 815035292bc35f24c43bea1dca28c430ed126751 [file] [log] [blame]
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +01001{{/*
jmac065e2ce2018-03-29 01:18:02 +00002# Copyright © 2017 Amdocs, Bell Canada
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.
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010015*/}}
jmac065e2ce2018-03-29 01:18:02 +000016
17apiVersion: v1
18kind: Service
19metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000020 name: {{ include "common.servicename" . }}
jmac065e2ce2018-03-29 01:18:02 +000021 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" . }}
jmac065e2ce2018-03-29 01:18:02 +000026 heritage: {{ .Release.Service }}
27 annotations:
28 msb.onap.org/service-info: '[
29 {
30 "serviceName": "sdnc-portal",
31 "version": "v1",
32 "url": "/",
33 "protocol": "UI",
34 "port": "{{ .Values.service.externalPort }}",
35 "visualRange":"0|1"
36 }
37 ]'
38spec:
39 type: {{ .Values.service.type }}
40 ports:
41 {{if eq .Values.service.type "NodePort" -}}
42 - port: {{ .Values.service.externalPort }}
43 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
BorislavG1ffbd992018-04-24 07:56:27 +000044 name: {{ .Values.service.portName }}
jmac065e2ce2018-03-29 01:18:02 +000045 {{- else -}}
46 - port: {{ .Values.service.externalPort }}
47 targetPort: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000048 name: {{ .Values.service.portName }}
jmac065e2ce2018-03-29 01:18:02 +000049 {{- end}}
50 selector:
51 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010052 release: {{ include "common.release" . }}