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

fix(kuma-cp): resources that were created on 2.7.x are missing namespace labels when synced on global #11794

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

lobkovilya
Copy link
Contributor

@lobkovilya lobkovilya commented Oct 17, 2024

Motivation

In 2.7.x method GetMeta().GetLabels() on Kubernetes returned a label map with k8s.kuma.io/namespace added dynamically. This behaviour was changed in 2.9.x by #11020, the namespace label is now supposed to be set in ComputeLabels function. But this functions is called only on Create/Update of the resources. This means policies that were created on 2.7.x won't have k8s.kuma.io/namespace label when synced to Global. Even though the lack of namespace labels affects only how resource looks in GUI on Global it's still worth setting it.

Implementation information

Set k8s.kuma.io/namespace label if not exist to the resources before syncing them to Global.

Supporting documentation

Fix #XX

@lobkovilya lobkovilya requested a review from a team as a code owner October 17, 2024 17:07
@lobkovilya lobkovilya requested review from jakubdyszkiewicz and Automaat and removed request for a team October 17, 2024 17:07
@lobkovilya lobkovilya changed the base branch from master to release-2.9 October 17, 2024 17:08
…ace labels when synced on global

Signed-off-by: Ilya Lobkov <[email protected]>
@lukidzi lukidzi added this to the 2.9.x milestone Oct 17, 2024
Signed-off-by: Ilya Lobkov <[email protected]>
@lobkovilya lobkovilya merged commit 1b6afe9 into kumahq:release-2.9 Oct 18, 2024
13 checks passed
@lobkovilya lobkovilya deleted the fix/set-ns-before-sync branch October 18, 2024 13:00
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.

4 participants