Skip to content

Commit

Permalink
Merge pull request #69 from spinkube/helm-lint-fix
Browse files Browse the repository at this point in the history
fix helm lint by defining new template helper
  • Loading branch information
rajatjindal authored Feb 15, 2024
2 parents e83c7af + 364e01b commit e96e0cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions charts/spin-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ If release name contains chart name it will be used as a full name.
{{- end }}
{{- end }}


{{/*
helmify replaces namespace name with `{{ .Release.Namespace }}` in dnsNames for Certificate object
which means `{{ include "spin-operator.fullname" . }}` gets replaced with `{{ include "{{ .Release.Namespace }}.fullname" . }}`

This is most likely a bug in helmify, but we can workaround it by defining a new template helper with name `{{ .Release.Namespace }}.fullname`
*/}}
{{- define "{{ .Release.Namespace }}.fullname" -}}
{{ include "spin-operator.fullname" . }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
Expand Down
4 changes: 2 additions & 2 deletions charts/spin-operator/templates/serving-cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ metadata:
{{- include "spin-operator.labels" . | nindent 4 }}
spec:
dnsNames:
- '{{ include "spin-operator.fullname" . }}-webhook-service.{{ .Release.Namespace
- '{{ include "{{ .Release.Namespace }}.fullname" . }}-webhook-service.{{ .Release.Namespace
}}.svc'
- '{{ include "spin-operator.fullname" . }}-webhook-service.{{ .Release.Namespace
- '{{ include "{{ .Release.Namespace }}.fullname" . }}-webhook-service.{{ .Release.Namespace
}}.svc.{{ .Values.kubernetesClusterDomain }}'
issuerRef:
kind: Issuer
Expand Down

0 comments on commit e96e0cb

Please sign in to comment.