Add new configuration and scripts to automate the credential creation and passing...
[it/dep.git] / ric-platform / 50-RIC-Platform / helm / common / templates / _helmrepo.tpl
index 30846dc..4143ce3 100644 (file)
     {{- end -}}
   {{- end -}}
 {{- end -}}
+
+{{/*
+Generate certificates for the helm repo
+*/}}
+{{- define "common.helmrepository.gen-certs" -}}
+{{- $altNames := list ( printf "helm.%s" .Values.ingress.hostpostfix ) -}}
+{{- $ca := genCA "helm-repository-ca" 365 -}}
+{{- $cert := genSignedCert ( include "nexus.name" . ) nil $altNames 365 $ca -}}
+tls.crt: {{ $cert.Cert | b64enc }}
+tls.key: {{ $cert.Key | b64enc }}
+{{- end -}}
+