Skip to content

Conversation

@mihaigalos
Copy link

Summary:

This PR mitigates runtime operator fights between mutators of the Pods generated by the MongoDB StatefulSet and the MongoDB Community Operator.

It preserves previous labels instead of hard-coding them. The previous logic of adding the app label is kept as-is. The MongoDB operator can still overwrite labels it wants to have in a specific form.

All Submissions:

Closes: mongodb/mongodb-kubernetes-operator#1732.

Signed-off-by: Mihai Galos <mihai@galos.one>
@mihaigalos
Copy link
Author

Hi @MaciejKaras, I had a merge problem here. Fixed now. Can you please recheck? Thanks.

Signed-off-by: Mihai Galos <mihai@galos.one>
@mihaigalos mihaigalos force-pushed the fix/operator/kyverno-mutations branch 2 times, most recently from bdebd78 to 8fa8fcb Compare September 10, 2025 08:34
@MaciejKaras MaciejKaras added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Sep 10, 2025
Copy link
Collaborator

@MaciejKaras MaciejKaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix 🙏

@mihaigalos
Copy link
Author

Hi @m1kola, @anandsyncs. Can you please also have a look at this PR? Thank you.

@mihaigalos
Copy link
Author

Up, please

@MaciejKaras
Copy link
Collaborator

@mihaigalos Could you also create a changelog mentioning your fix? This PR changes the behaviour of Pod labels a little and we need to mention this in Release Notes. More info on how to create changelog and how it is used later -> https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes

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

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator fight with Kyverno: Labels on Pods

2 participants