Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame^] | 1 | {{/* |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 2 | # Copyright © 2018 Amdocs, Bell Canada |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 3 | # Copyright © 2017 Amdocs, Bell Canada |
| 4 | # Modifications Copyright © 2018 AT&T, ZTE |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame^] | 17 | */}} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 18 | |
| 19 | apiVersion: v1 |
| 20 | kind: Service |
| 21 | metadata: |
| 22 | name: {{ include "common.servicename" . }} |
| 23 | namespace: {{ include "common.namespace" . }} |
| 24 | labels: |
| 25 | app: {{ include "common.name" . }} |
| 26 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 27 | release: {{ include "common.release" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 28 | heritage: {{ .Release.Service }} |
| 29 | spec: |
| 30 | type: {{ .Values.service.type }} |
| 31 | ports: |
| 32 | {{if eq .Values.service.type "NodePort" -}} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 33 | - port: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 34 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 35 | name: {{ .Values.service.portName }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 36 | {{- else -}} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 37 | - port: {{ if .Values.config.serverSslEnabled }}{{ .Values.service.externalPort2 }}{{ else }}{{ .Values.service.externalPort }}{{ end }} |
| 38 | targetPort: {{ template "wfd-be.internalPort" . }} |
| 39 | name: {{ .Values.service.portName }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 40 | {{- end}} |
| 41 | selector: |
| 42 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 43 | release: {{ include "common.release" . }} |