blob: 4c3cd7fc826250256d1029f10aa611baa5a7f272 [file] [log] [blame]
Lathish90f14b92021-07-02 10:31:56 +01001################################################################################
2# Copyright (c) 2021 Nordix Foundation. #
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
17{{- define "service.ports" -}}
18{{- if .http }}
19{{if eq .http.enabled true -}}
20- name: {{ .name }}-http
21 port: {{ .http.servicePort }}
22 targetPort: {{ .http.containerPort }}
23 protocol: TCP
24{{- end }}
25{{- end }}
26{{- if .tls }}
27{{if eq .tls.enabled true -}}
28- name: {{ .name }}-tls
29 port: {{ .tls.servicePort }}
30 targetPort: {{ .tls.containerPort }}
31 protocol: TCP
32{{- end }}
33{{- end }}
34{{- end -}}