Skip to content

Commit

Permalink
fixced chart helper names
Browse files Browse the repository at this point in the history
  • Loading branch information
jgz committed Sep 29, 2021
1 parent 3ed940c commit 811f785
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Create the name of the tls secret for secure port
*/}}
{{- define "helm-chart.tlsSecretName" -}}
{{- $fullname := include "helm-chart.fullname" . -}}
{{- default (printf "%s-tls" $fullname) .Values.tls.secretName }}
{{- end }}
6 changes: 3 additions & 3 deletions chart/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ template "podinfo.fullname" . }}
name: {{ template "helm-chart.fullname" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
{{- include "helm-chart.labels" . | nindent 4 }}
spec:
dnsNames:
{{- range .Values.certificate.dnsNames }}
- {{ . | quote }}
{{- end }}
secretName: {{ template "podinfo.tlsSecretName" . }}
secretName: {{ template "helm-chart.tlsSecretName" . }}
issuerRef:
{{- .Values.certificate.issuerRef | toYaml | trimSuffix "\n" | nindent 4 }}
{{- end }}

0 comments on commit 811f785

Please sign in to comment.