*/}}
{{- define "common.helmrepositorytillerport" -}}
{{- if .Values.helmRepositoryTillerPortOverride -}}
- {{- printf "%s" .Values.helmRepositoryTillerPortOverride -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPortOverride -}}
{{- else -}}
{{- if .Values.global -}}
{{- if .Values.global.helmRepositoryTillerPort -}}
- {{- printf "%s" .Values.global.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.global.helmRepositoryTillerPort -}}
{{- else -}}
- {{- printf "%s" .Values.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPort -}}
{{- end -}}
{{- else -}}
- {{- printf "%s" .Values.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPort -}}
{{- 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 -}}
+