Skip to content

fix: strip fluxcd managed labels - #1065

Open
jkroepke wants to merge 3 commits into
databus23:masterfrom
jkroepke:patch-1
Open

fix: strip fluxcd managed labels#1065
jkroepke wants to merge 3 commits into
databus23:masterfrom
jkroepke:patch-1

Conversation

@jkroepke

@jkroepke jkroepke commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

running helm diff against fluxcd managed helm release also shows a diff in terms of labels.


The current workaround is using

      --suppress-output-line-regex="helm.toolkit.fluxcd.io/name:" \
      --suppress-output-line-regex="helm.toolkit.fluxcd.io/namespace:" \

However, each single resource is present in the output with a suppressed notice.

An alternative approach would be:

      --strip-output-line-regex="helm.toolkit.fluxcd.io/name:" \
      --strip-output-line-regex="helm.toolkit.fluxcd.io/namespace:" \

The strip-output-lines is executed on source and target, before diff. Without any notice on the diff output.

@yxxhero

yxxhero commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

@jkroepke lint issue.

@yxxhero

yxxhero commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Error: manifest/util.go:33:1: File is not properly formatted (gci)
pruneNestedMap(metadata, "labels",
^
1 issues:

  • gci: 1

Error: issues found
Ran golangci-lint in 22762ms

Comment thread manifest/util.go Outdated
@yxxhero

yxxhero commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Error: manifest/util.go:34:1: File is not properly formatted (gci)
pruneNestedMap(metadata, "labels",
^
1 issues:

  • gci: 1

Error: issues found
Ran golangci-lint in 3195ms

@jkroepke

jkroepke commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@yxxhero this PR does not close #1064

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: helm-diff shows - labels, if resource contains only app.kubernetes.io/managed-by label

2 participants