blob: 1bce881a8ed6d1ec7197cdb2ea4039a1a570158b [file] [log] [blame]
pramodad6382f2018-03-28 22:32:00 +00001# Copyright © 2017 Amdocs, Bell Canada
Durgpal7ad40692018-08-03 07:28:36 +00002# Modifications Copyright © 2018 AT&T
pramodad6382f2018-03-28 22:32:00 +00003#
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.
15
16apiVersion: v1
17kind: Service
18metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000019 name: {{ include "common.servicename" . }}
pramodad6382f2018-03-28 22:32:00 +000020 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26 annotations:
27 msb.onap.org/service-info: '[
28 {
BorislavG1ffbd992018-04-24 07:56:27 +000029 "serviceName": "{{ include "common.servicename" . }}",
pramodad6382f2018-03-28 22:32:00 +000030 "version": "v1",
31 "url": "/",
32 "protocol": "REST",
33 "port": "{{.Values.service.internalPort}}",
34 "visualRange":"1"
35 }
36 ]'
37
38spec:
39 type: {{ .Values.service.type }}
40 ports:
41 {{if eq .Values.service.type "NodePort" -}}
efiacor16669c52019-05-14 09:10:20 +000042 {{- if .Values.global.allow_http }}
pramodad6382f2018-03-28 22:32:00 +000043 - port: {{ .Values.service.externalPort }}
44 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
BorislavG1ffbd992018-04-24 07:56:27 +000045 name: {{ .Values.service.portName }}-{{ .Values.service.externalPort }}
efiacor16669c52019-05-14 09:10:20 +000046 {{- end}}
pramodad6382f2018-03-28 22:32:00 +000047 - port: {{ .Values.service.externalPort2 }}
48 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
BorislavG1ffbd992018-04-24 07:56:27 +000049 name: {{ .Values.service.portName }}-{{ .Values.service.externalPort2 }}
pramodad6382f2018-03-28 22:32:00 +000050 {{- else -}}
51 - port: {{ .Values.service.externalPort }}
52 targetPort: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000053 name: {{ .Values.service.portName }}
pramodad6382f2018-03-28 22:32:00 +000054 {{- end}}
55 selector:
56 app: {{ include "common.name" . }}
57 release: {{ .Release.Name }}