blob: 6c85985854a15341858d438e2c937b750297b8f4 [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"
Mike Elliott13fed112018-02-28 08:33:33 -050034 {{- else -}}
35 - port: {{ .Values.service.externalPort }}
36 targetPort: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000037 name: {{ .Values.service.portName }}-8282
38 - port: {{ .Values.service.externalPort2 }}
39 targetPort: {{ .Values.service.internalPort2 }}
40 name: {{ .Values.service.portName }}-1830
Mike Elliott13fed112018-02-28 08:33:33 -050041 {{- end}}
42 selector:
43 app: {{ include "common.name" . }}
44 release: {{ .Release.Name }}
45---
46apiVersion: v1
47kind: Service
48metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000049 name: {{ include "common.servicename" . }}-cluster
Mike Elliott13fed112018-02-28 08:33:33 -050050 namespace: {{ include "common.namespace" . }}
51 labels:
52 app: {{ include "common.name" . }}
53 release: {{ .Release.Name }}
54 annotations:
55 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
56spec:
57 ports:
BorislavG1ffbd992018-04-24 07:56:27 +000058 - name: "{{ .Values.service.portName }}-cluster-port"
Mike Elliott13fed112018-02-28 08:33:33 -050059 port: {{ .Values.service.clusterPort }}
60 clusterIP: None
61 selector:
62 app: {{ include "common.name" . }}
63 release: {{ .Release.Name }}
64 sessionAffinity: None
65 type: ClusterIP