Jakub Latusek | 44f0fdd | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 2 | # Copyright © 2018 AT&T USA |
vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 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 | 44f0fdd | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 15 | */}} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 16 | apiVersion: v1 |
| 17 | kind: Service |
| 18 | metadata: |
Mike Elliott | 282751f | 2018-04-19 17:24:08 -0400 | [diff] [blame] | 19 | name: {{ include "common.servicename" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }} |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 24 | release: {{ include "common.release" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | type: {{ .Values.service.type }} |
| 28 | ports: |
| 29 | {{if eq .Values.service.type "NodePort" -}} |
| 30 | - port: {{ .Values.service.internalPort }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 31 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
| 32 | name: {{ .Values.service.portName }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 33 | {{- else -}} |
| 34 | - port: {{ .Values.service.externalPort }} |
| 35 | targetPort: {{ .Values.service.internalPort }} |
Mike Elliott | 282751f | 2018-04-19 17:24:08 -0400 | [diff] [blame] | 36 | name: {{ .Values.service.portName }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 37 | {{- end}} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 38 | selector: |
| 39 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 40 | release: {{ include "common.release" . }} |