Skip to content

Detect immutable field changes #730

Open
@okozachenko1203

Description

@okozachenko1203

Is it possible to add the information in the change list if the change is for immutable fields of the resource type.

I was able to get the change path in dyff output format.

spec.selector.matchLabels.component  (Deployment/default/memcached-memcached)
  ± value change
    - server
    + server-new

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 }}]`

It would be good if we can render the change path (for instance, spec.selector.matchLabels.component) in the tpl.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions