Skip to content

fix: stop writing extraLabels/extraAnnotations to Helm releases after install - #2145

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:remove-helm-extra-metadata
Dec 4, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:remove-helm-extra-metadata

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

addExtraMetadata read an existing Helm release through the managed cluster rest.Config carried in the context, but built the client used for the writes with clientcmd.BuildConfigFromFlags("", kubeconfig). In push mode kubeconfig is empty, so client-go fell back to the in-cluster config and the server-side apply was sent to the management cluster with addon-controller's ServiceAccount. A chart whose manifest contained a kind known to the management cluster could create or overwrite objects there.

ExtraLabels and ExtraAnnotations are deprecated in favor of Patches, which Helm applies through its post-renderer using the managed cluster client. Drop addExtraMetadata and the helpers only it used instead of fixing the client.

The path was only reachable in push mode: pull mode returns earlier in handleChart. Resources deployed outside Helm still get the extra labels and annotations through deployer.AddMetadata.

… install

addExtraMetadata read an existing Helm release through the managed cluster
rest.Config carried in the context, but built the client used for the writes
with clientcmd.BuildConfigFromFlags("", kubeconfig). In push mode kubeconfig
is empty, so client-go fell back to the in-cluster config and the server-side
apply was sent to the management cluster with addon-controller's
ServiceAccount. A chart whose manifest contained a kind known to the
management cluster could create or overwrite objects there.

ExtraLabels and ExtraAnnotations are deprecated in favor of Patches, which
Helm applies through its post-renderer using the managed cluster client. Drop
addExtraMetadata and the helpers only it used instead of fixing the client.

The path was only reachable in push mode: pull mode returns earlier in
handleChart. Resources deployed outside Helm still get the extra labels and
annotations through deployer.AddMetadata.
@gianlucam76
gianlucam76 merged commit 45df9b5 into projectsveltos:main Dec 4, 2026
14 checks passed
@gianlucam76
gianlucam76 deleted the remove-helm-extra-metadata branch December 4, 2026 09:12
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.

1 participant