blob: 6ffef221a6f2816f47e291ef7b83eb4b2772cc08 [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -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 msb.onap.org/service-info: '[
13 {
14 "serviceName": "appc",
15 "version": "v1",
16 "url": "/",
17 "protocol": "REST",
18 "port": "{{ .Values.service.externalPort }}",
19 "visualRange":"1",
20 "path": "/"
21 }
22 ]'
23spec:
24 type: {{ .Values.service.type }}
25 ports:
26 {{if eq .Values.service.type "NodePort" -}}
27 - port: {{ .Values.service.externalPort }}
28 targetPort: {{ .Values.service.internalPort }}
29 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
30 name: "{{ .Values.service.name }}-8282"
31 - port: {{ .Values.service.externalPort2 }}
32 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
33 name: "{{ .Values.service.name }}-1830"
34 {{- else -}}
35 - port: {{ .Values.service.externalPort }}
36 targetPort: {{ .Values.service.internalPort }}
37 name: {{ .Values.service.name }}
38 {{- end}}
39 selector:
40 app: {{ include "common.name" . }}
41 release: {{ .Release.Name }}
42---
43apiVersion: v1
44kind: Service
45metadata:
46 name: {{ .Values.service.name }}-cluster
47 namespace: {{ include "common.namespace" . }}
48 labels:
49 app: {{ include "common.name" . }}
50 release: {{ .Release.Name }}
51 annotations:
52 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
53spec:
54 ports:
55 - name: "{{ .Values.service.name }}-cluster-port"
56 port: {{ .Values.service.clusterPort }}
57 clusterIP: None
58 selector:
59 app: {{ include "common.name" . }}
60 release: {{ .Release.Name }}
61 sessionAffinity: None
62 type: ClusterIP