blob: 96a2acd3a62e4831d5c6cd1e404f799806cb6cf0 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
MichaelMorris74fda382019-03-17 09:36:27 +00002# Copyright © 2019 Nordix Foundation
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 Latusek44f0fdd2020-10-21 13:36:29 +020015*/}}
MichaelMorris74fda382019-03-17 09:36:27 +000016apiVersion: v1
17kind: Service
18metadata:
19 name: {{ include "common.servicename" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010024 release: {{ include "common.release" . }}
MichaelMorris74fda382019-03-17 09:36:27 +000025 heritage: {{ .Release.Service }}
26 annotations:
27 msb.onap.org/service-info: '[
28 {
29 "serviceName": "{{ include "common.servicename" . }}",
30 "version": "v1",
31 "url": "/so/vnfm-adapter/v1",
32 "protocol": "REST",
33 "port": "{{.Values.service.externalPort}}",
34 "visualRange":"1"
35 }
36 ]'
37spec:
38 type: {{ .Values.service.type }}
39 ports:
40 {{if eq .Values.service.type "NodePort" -}}
41 - port: {{ .Values.service.internalPort }}
42 nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
Andreas Geissler17be9622022-04-29 13:33:02 +020043 name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
MichaelMorris74fda382019-03-17 09:36:27 +000044 {{- else -}}
45 - port: {{ .Values.service.externalPort }}
46 targetPort: {{ .Values.service.internalPort }}
Andreas Geissler17be9622022-04-29 13:33:02 +020047 name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
MichaelMorris74fda382019-03-17 09:36:27 +000048 {{- end}}
49 selector:
50 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010051 release: {{ include "common.release" . }}