Skip to content

Commit

Permalink
Don't need recursive printer
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Aug 13, 2024
1 parent 406f391 commit e5a3869
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
16 changes: 0 additions & 16 deletions hack/charts/cluster-api-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,3 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Print nested key-value pairs recursively for nested values
*/}}
{{- define "capi-operator.recursivePrinter" }}
{{- if kindIs "map" . }}
{{- range $key, $value := . }}
{{- if kindIs "map" $value }}
{{ $key }}:
{{- include "capi-operator.recursivePrinter" $value | indent 2 }}
{{- else }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 1 addition & 2 deletions hack/charts/cluster-api-operator/templates/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ spec:
{{- end }}
{{- end }}
{{- if $.Values.additionalDeployments }}
additionalDeployments:
{{- include "capi-operator.recursivePrinter" $.Values.additionalDeployments | indent 2 }}
additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit e5a3869

Please sign in to comment.