blob: 733c4ca3bed0c5d39aa92f1c1954256a23e9c4dd [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -05001apiVersion: v1
2kind: Service
3metadata:
BorislavG1ffbd992018-04-24 07:56:27 +00004 name: {{ include "common.servicename" . }}
Mike Elliott13fed112018-02-28 08:33:33 -05005 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 }}
BorislavG1ffbd992018-04-24 07:56:27 +000030 name: "{{ .Values.service.portName }}-8282"
Mike Elliott13fed112018-02-28 08:33:33 -050031 - port: {{ .Values.service.externalPort2 }}
32 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
BorislavG1ffbd992018-04-24 07:56:27 +000033 name: "{{ .Values.service.portName }}-1830"
Patrick Brady140deb92018-05-23 08:56:24 -070034 - port: {{ .Values.service.externalPort3 }}
Patrick Brady1a62b662018-05-30 10:56:46 -070035 targetPort: {{ .Values.service.internalPort3 }}
Patrick Brady140deb92018-05-23 08:56:24 -070036 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
37 name: "{{ .Values.service.portName }}-9090"
Mike Elliott13fed112018-02-28 08:33:33 -050038 {{- else -}}
39 - port: {{ .Values.service.externalPort }}
40 targetPort: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000041 name: {{ .Values.service.portName }}-8282
42 - port: {{ .Values.service.externalPort2 }}
43 targetPort: {{ .Values.service.internalPort2 }}
44 name: {{ .Values.service.portName }}-1830
Patrick Brady140deb92018-05-23 08:56:24 -070045 - port: {{ .Values.service.externalPort3 }}
46 targetPort: {{ .Values.service.internalPort3 }}
47 name: {{ .Values.service.portName }}-9090
Mike Elliott13fed112018-02-28 08:33:33 -050048 {{- end}}
49 selector:
50 app: {{ include "common.name" . }}
51 release: {{ .Release.Name }}
52---
53apiVersion: v1
54kind: Service
55metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000056 name: {{ include "common.servicename" . }}-cluster
Mike Elliott13fed112018-02-28 08:33:33 -050057 namespace: {{ include "common.namespace" . }}
58 labels:
59 app: {{ include "common.name" . }}
60 release: {{ .Release.Name }}
61 annotations:
62 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
63spec:
64 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000065 - name: "{{ .Values.service.portName }}-cluster-port"
Mike Elliott13fed112018-02-28 08:33:33 -050066 port: {{ .Values.service.clusterPort }}
67 clusterIP: None
68 selector:
69 app: {{ include "common.name" . }}
70 release: {{ .Release.Name }}
71 sessionAffinity: None
72 type: ClusterIP