Jakub Latusek | 647e2cf | 2020-10-21 13:27:09 +0200 | [diff] [blame^] | 1 | {{/* |
Mukul | 2b4e753 | 2018-08-03 10:41:29 +0000 | [diff] [blame] | 2 | # Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Jakub Latusek | 647e2cf | 2020-10-21 13:27:09 +0200 | [diff] [blame^] | 15 | */}} |
Mukul | 2b4e753 | 2018-08-03 10:41:29 +0000 | [diff] [blame] | 16 | |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 20 | name: {{ include "common.servicename" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 21 | namespace: {{ include "common.namespace" . }} |
| 22 | labels: |
| 23 | app: {{ include "common.name" . }} |
| 24 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 25 | release: {{ include "common.release" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 26 | heritage: {{ .Release.Service }} |
| 27 | annotations: |
| 28 | msb.onap.org/service-info: '[ |
| 29 | { |
| 30 | "serviceName": "appc", |
| 31 | "version": "v1", |
| 32 | "url": "/", |
| 33 | "protocol": "REST", |
| 34 | "port": "{{ .Values.service.externalPort }}", |
| 35 | "visualRange":"1", |
| 36 | "path": "/" |
| 37 | } |
| 38 | ]' |
| 39 | spec: |
| 40 | type: {{ .Values.service.type }} |
| 41 | ports: |
| 42 | {{if eq .Values.service.type "NodePort" -}} |
| 43 | - port: {{ .Values.service.externalPort }} |
| 44 | targetPort: {{ .Values.service.internalPort }} |
| 45 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
Taka Cho | 96a53f7 | 2020-03-13 15:42:34 -0400 | [diff] [blame] | 46 | name: "{{ .Values.service.portName }}-8443" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 47 | - port: {{ .Values.service.externalPort2 }} |
Taka Cho | 3c29d5f | 2019-09-04 15:38:31 -0400 | [diff] [blame] | 48 | targetPort: {{ .Values.service.internalPort2 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 49 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} |
Taka Cho | 96a53f7 | 2020-03-13 15:42:34 -0400 | [diff] [blame] | 50 | name: "{{ .Values.service.portName }}-1830" |
Patrick Brady | 140deb9 | 2018-05-23 08:56:24 -0700 | [diff] [blame] | 51 | - port: {{ .Values.service.externalPort3 }} |
Patrick Brady | 1a62b66 | 2018-05-30 10:56:46 -0700 | [diff] [blame] | 52 | targetPort: {{ .Values.service.internalPort3 }} |
Patrick Brady | 140deb9 | 2018-05-23 08:56:24 -0700 | [diff] [blame] | 53 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} |
| 54 | name: "{{ .Values.service.portName }}-9090" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 55 | {{- else -}} |
| 56 | - port: {{ .Values.service.externalPort }} |
| 57 | targetPort: {{ .Values.service.internalPort }} |
Taka Cho | 96a53f7 | 2020-03-13 15:42:34 -0400 | [diff] [blame] | 58 | name: {{ .Values.service.portName }}-8443 |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 59 | - port: {{ .Values.service.externalPort2 }} |
| 60 | targetPort: {{ .Values.service.internalPort2 }} |
Taka Cho | 96a53f7 | 2020-03-13 15:42:34 -0400 | [diff] [blame] | 61 | name: {{ .Values.service.portName }}-1830 |
Patrick Brady | 140deb9 | 2018-05-23 08:56:24 -0700 | [diff] [blame] | 62 | - port: {{ .Values.service.externalPort3 }} |
| 63 | targetPort: {{ .Values.service.internalPort3 }} |
| 64 | name: {{ .Values.service.portName }}-9090 |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 65 | {{- end}} |
| 66 | selector: |
| 67 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 68 | release: {{ include "common.release" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 69 | --- |
| 70 | apiVersion: v1 |
| 71 | kind: Service |
| 72 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 73 | name: {{ include "common.servicename" . }}-cluster |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 74 | namespace: {{ include "common.namespace" . }} |
| 75 | labels: |
| 76 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 77 | release: {{ include "common.release" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 78 | annotations: |
| 79 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
| 80 | spec: |
| 81 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 82 | - name: "{{ .Values.service.portName }}-cluster-port" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 83 | port: {{ .Values.service.clusterPort }} |
| 84 | clusterIP: None |
| 85 | selector: |
| 86 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 87 | release: {{ include "common.release" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 88 | sessionAffinity: None |
| 89 | type: ClusterIP |