blob: 83e9bb458d5edd6f38dfe21df04ce0cb4f280a0a [file] [log] [blame]
Mandeep Khindaa1047f42018-03-22 02:12:15 +00001apiVersion: v1
2kind: Service
3metadata:
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
6 labels:
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
11 annotations:
12 msb.onap.org/service-info: '[
13 {
14 "serviceName": "sdc",
15 "version": "v1",
16 "url": "/sdc/v1",
17 "protocol": "REST",
18 "port": "{{ .Values.service.internalPort2 }}",
19 "visualRange":"1"
20 },
21 {
22 "serviceName": "sdc-deprecated",
23 "version": "v1",
24 "url": "/sdc/v1",
25 "protocol": "REST",
26 "port": "{{ .Values.service.internalPort2 }}",
27 "visualRange":"1",
28 "path":"/sdc/v1"
29 }
30 ]'
31spec:
32 type: {{ .Values.service.type }}
33 ports:
34 {{if eq .Values.service.type "NodePort" -}}
35 - port: {{ .Values.service.internalPort }}
36 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
37 name: {{ .Values.service.name }}
38 - port: {{ .Values.service.internalPort2 }}
39 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
40 name: {{ .Values.service.name }}2
41 {{- else -}}
42 - port: {{ .Values.service.externalPort }}
43 targetPort: {{ .Values.service.internalPort }}
44 name: {{ .Values.service.name }}
45 - port: {{ .Values.service.externalPort2 }}
46 targetPort: {{ .Values.service.internalPort2 }}
47 name: {{ .Values.service.name }}2
48 {{- end}}
49 selector:
50 app: {{ include "common.name" . }}
51 release: {{ .Release.Name }}