helm-diff icon indicating copy to clipboard operation
helm-diff copied to clipboard

HELM_DIFF_TPL Example

Open volfco opened this issue 3 years ago • 2 comments

I don't see an example HELM_DIFF_TPL, even though the tests reference "testdata/customTemplate.tpl". Would you be able to provide a starting point?

volfco avatar Nov 02 '22 19:11 volfco

[
{{- $global := . -}}
{{- range $idx, $entry := . -}}
{
  "api": "{{ $entry.API }}",
  "kind": "{{ $entry.Kind }}",
  "namespace": "{{ $entry.Namespace }}",
  "name": "{{ $entry.Name }}",
  "change": "{{ $entry.Change }}"
}{{ if not (last $idx  $global) }},{{ end }}
{{- end }}
]

See https://github.com/databus23/helm-diff/blob/master/diff/constant.go

2ZZ avatar Feb 01 '23 13:02 2ZZ

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 21 '23 20:05 stale[bot]