diff options
Diffstat (limited to 'helm/netconf/templates/_helpers.tpl')
-rw-r--r-- | helm/netconf/templates/_helpers.tpl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/helm/netconf/templates/_helpers.tpl b/helm/netconf/templates/_helpers.tpl index 1b0ef5c..2b620b9 100644 --- a/helm/netconf/templates/_helpers.tpl +++ b/helm/netconf/templates/_helpers.tpl @@ -1,3 +1,19 @@ +{{/* +# Copyright © 2022 Nokia. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} + {{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. @@ -51,3 +67,28 @@ app.kubernetes.io/name: {{ include "netconf-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Define dns names in certificate +*/}} +{{- define "netconf.serverCertificates.dnsNames" -}} +{{- range $dnsName := $.Values.serverCertificates.dnsNames }} +- {{ $dnsName }} +{{- end }} +{{- end }} + +{{/* +Define dns names in certificate +*/}} +{{- define "netconf.clientCertificates.dnsNames" -}} +{{- range $dnsName := $.Values.clientCertificates.dnsNames }} +- {{ $dnsName }} +{{- end }} +{{- end }} + +{{/* +Common namespace +*/}} +{{- define "netconf.namespace" -}} + {{- default .Release.Namespace .Values.nsPrefix -}} +{{- end -}} + |