You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
Sometimes upstream CRDs have things like {{ .cluster.name }}-{{ .random }} in their description fields (like the ClusterClass CRD of cluster-api, see bellow), which should be present as-is in the final helm output / installation. But because {{ and }} are interpreted by helm, that leads to errors during templating.
Desired solution
Have helmify detect usage of {{}} in the provided manifests and replace them with
{{`{{
and
}}`}}
respectively. As shown bellow in the workaround.
How to reproduce
Create chart
curl -sL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.0/core-components.yaml | \
go run github.com/arttor/helmify/cmd/[email protected] -vv
and then try to render the generated chart
$ helm template .
zsh: correct 'template' to 'templates' [nyae]? n
Error: template: chart/templates/clusterclass-crd.yaml:679:74: executing "chart/templates/clusterclass-crd.yaml" at <.cluster.name>: nil pointer evaluating interface {}.name
Use --debug flag to render out invalid YAML
Workaround
exists by wrapping the {{}} as part of the pipeline
curl -sL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.0/core-components.yaml | \
sed -e 's@{{@{{`{{@g' -e 's@}}@}}`}}@g' | \
go run github.com/arttor/helmify/cmd/[email protected] -vv
The text was updated successfully, but these errors were encountered:
Issue
Sometimes upstream CRDs have things like
{{ .cluster.name }}-{{ .random }}
in their description fields (like theClusterClass
CRD of cluster-api, see bellow), which should be present as-is in the final helm output / installation. But because{{
and}}
are interpreted by helm, that leads to errors during templating.Desired solution
Have helmify detect usage of
{{}}
in the provided manifests and replace them withand
respectively. As shown bellow in the workaround.
How to reproduce
Create chart
and then try to render the generated chart
Workaround
exists by wrapping the
{{}}
as part of the pipelineThe text was updated successfully, but these errors were encountered: