Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, AT&T |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Bell Canada |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [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. |
| 15 | |
| 16 | apiVersion: v1 |
| 17 | kind: Service |
| 18 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 19 | name: {{ include "common.servicename" . }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }} |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 24 | release: {{ .Release.Name }} |
| 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | type: {{ .Values.service.type }} |
| 28 | ports: |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame^] | 29 | {{ if .Values.global.installSidecarSecurity }} |
| 30 | {{if eq .Values.service.type "NodePort" -}} |
| 31 | - port: {{ .Values.service.internalPort }} |
| 32 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
| 33 | targetPort: {{ .Values.global.rproxy.port }} |
| 34 | name: {{ .Values.service.portName }} |
| 35 | {{- else -}} |
| 36 | - port: {{ .Values.service.externalPort }} |
| 37 | targetPort: {{ .Values.global.rproxy.port }} |
| 38 | name: {{ .Values.service.portName }} |
| 39 | {{- end}} |
| 40 | {{ else }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 41 | {{if eq .Values.service.type "NodePort" -}} |
| 42 | - port: {{ .Values.service.internalPort}} |
| 43 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort}} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 44 | name: {{ .Values.service.portName }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 45 | {{- else -}} |
| 46 | - port: {{ .Values.service.externalPort }} |
| 47 | targetPort: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 48 | name: {{ .Values.service.portName }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 49 | {{- end}} |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame^] | 50 | {{ end }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 51 | selector: |
| 52 | app: {{ include "common.name" . }} |
| 53 | release: {{ .Release.Name }} |