Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get the change path via HELM_DIFF_TPL? #729

Open
okozachenko1203 opened this issue Jan 23, 2025 · 1 comment
Open

Is it possible to get the change path via HELM_DIFF_TPL? #729

okozachenko1203 opened this issue Jan 23, 2025 · 1 comment

Comments

@okozachenko1203
Copy link

I can see the default helm diff template in the code base.

package diff
const defaultTemplateReport = `[
{{- $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 }}]`

Is it possible to render the change path (for instance, spec.selector.matchLabels.component) in the tpl?

The final goal is to detect the immutable field changes using this helm diff plugin.

@yxxhero
Copy link
Collaborator

yxxhero commented Jan 24, 2025

@okozachenko1203 PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants