Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 1 | {{/* |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 2 | # |
| 3 | # ============LICENSE_START======================================================= |
| 4 | # org.onap.aai |
| 5 | # ================================================================================ |
| 6 | # Copyright © 2018 AT&T Intellectual Property. All rights reserved. |
Sylvain Desbureaux | c57b58d | 2021-02-23 18:07:34 +0100 | [diff] [blame] | 7 | # Modifications Copyright © 2021 Orange |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 8 | # ================================================================================ |
| 9 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 10 | # you may not use this file except in compliance with the License. |
| 11 | # You may obtain a copy of the License at |
| 12 | # |
| 13 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | # |
| 15 | # Unless required by applicable law or agreed to in writing, software |
| 16 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | # See the License for the specific language governing permissions and |
| 19 | # limitations under the License. |
| 20 | # ============LICENSE_END========================================================= |
Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 21 | */}} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 22 | |
| 23 | apiVersion: v1 |
| 24 | kind: Service |
| 25 | metadata: |
| 26 | name: {{ include "common.servicename" . }} |
| 27 | namespace: {{ include "common.namespace" . }} |
| 28 | labels: |
| 29 | app: {{ include "common.name" . }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 30 | app.kubernetes.io/name: {{ include "common.name" . }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 31 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 32 | release: {{ include "common.release" . }} |
| 33 | heritage: {{ .Release.Service }} |
| 34 | spec: |
| 35 | type: {{ .Values.service.type }} |
| 36 | ports: |
| 37 | {{if eq .Values.service.type "NodePort" -}} |
| 38 | - port: {{ .Values.service.internalPort }} |
| 39 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 40 | name: {{ .Values.service.portName }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 41 | targetPort: {{ .Values.service.portName }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 42 | - port: {{ .Values.service.internalPort2 }} |
| 43 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} |
| 44 | name: {{ .Values.service.portName2 }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 45 | targetPort: {{ .Values.service.portName2 }} |
leila | 46fb580 | 2022-11-15 11:33:21 -0500 | [diff] [blame] | 46 | - port: {{ .Values.service.internalPort3 }} |
| 47 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} |
| 48 | name: {{ .Values.service.portName3 }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 49 | targetPort: {{ .Values.service.portName3 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 50 | {{- else -}} |
| 51 | - port: {{ .Values.service.internalPort }} |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 52 | name: {{ .Values.service.portName }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 53 | targetPort: {{ .Values.service.portName }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 54 | - port: {{ .Values.service.internalPort2 }} |
| 55 | name: {{ .Values.service.portName2 }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 56 | targetPort: {{ .Values.service.portName2 }} |
leila | 46fb580 | 2022-11-15 11:33:21 -0500 | [diff] [blame] | 57 | - port: {{ .Values.service.internalPort3 }} |
| 58 | name: {{ .Values.service.portName3 }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 59 | targetPort: {{ .Values.service.portName }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 60 | {{- end}} |
| 61 | selector: |
| 62 | app: {{ include "common.name" . }} |
| 63 | release: {{ include "common.release" . }} |