blob: afa2e3b600e86d9e18174319799f3e2d710d2f5a [file] [log] [blame]
Mike Elliott282a3872018-02-28 09:55:14 -05001apiVersion: 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# Example MSB registration annotation
13# msb.onap.org/service-info: '[
14# {
15# "serviceName": "so",
16# "version": "v1",
17# "url": "/ecomp/mso/infra",
18# "protocol": "REST"
19# "port": "8080",
20# "visualRange":"1"
21# }
22# ]'
23spec:
24 type: {{ .Values.service.type }}
25 ports:
26 {{if eq .Values.service.type "NodePort" -}}
27 - port: {{ .Values.service.externalPort }}
28 #Example internal target port if required
29 #targetPort: {{ .Values.service.internalPort }}
30 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
31 name: {{ .Values.service.name }}
32 {{- else -}}
33 - port: {{ .Values.service.externalPort }}
34 targetPort: {{ .Values.service.internalPort }}
35 name: {{ .Values.service.name }}
36 {{- end}}
37 selector:
38 app: {{ include "common.name" . }}
39 release: {{ .Release.Name }}