Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 4 | name: {{ include "common.servicename" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 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 | ]' |
| 23 | spec: |
| 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 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 30 | name: "{{ .Values.service.portName }}-8282" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 31 | - port: {{ .Values.service.externalPort2 }} |
| 32 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 33 | name: "{{ .Values.service.portName }}-1830" |
Patrick Brady | 140deb9 | 2018-05-23 08:56:24 -0700 | [diff] [blame] | 34 | - port: {{ .Values.service.externalPort3 }} |
Patrick Brady | 1a62b66 | 2018-05-30 10:56:46 -0700 | [diff] [blame] | 35 | targetPort: {{ .Values.service.internalPort3 }} |
Patrick Brady | 140deb9 | 2018-05-23 08:56:24 -0700 | [diff] [blame] | 36 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} |
| 37 | name: "{{ .Values.service.portName }}-9090" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 38 | {{- else -}} |
| 39 | - port: {{ .Values.service.externalPort }} |
| 40 | targetPort: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 41 | name: {{ .Values.service.portName }}-8282 |
| 42 | - port: {{ .Values.service.externalPort2 }} |
| 43 | targetPort: {{ .Values.service.internalPort2 }} |
| 44 | name: {{ .Values.service.portName }}-1830 |
Patrick Brady | 140deb9 | 2018-05-23 08:56:24 -0700 | [diff] [blame] | 45 | - port: {{ .Values.service.externalPort3 }} |
| 46 | targetPort: {{ .Values.service.internalPort3 }} |
| 47 | name: {{ .Values.service.portName }}-9090 |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 48 | {{- end}} |
| 49 | selector: |
| 50 | app: {{ include "common.name" . }} |
| 51 | release: {{ .Release.Name }} |
| 52 | --- |
| 53 | apiVersion: v1 |
| 54 | kind: Service |
| 55 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 56 | name: {{ include "common.servicename" . }}-cluster |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 57 | 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" |
| 63 | spec: |
| 64 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 65 | - name: "{{ .Values.service.portName }}-cluster-port" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 66 | port: {{ .Values.service.clusterPort }} |
| 67 | clusterIP: None |
| 68 | selector: |
| 69 | app: {{ include "common.name" . }} |
| 70 | release: {{ .Release.Name }} |
| 71 | sessionAffinity: None |
| 72 | type: ClusterIP |