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

Merge Annotations and Labels in CreateOrPatch #343

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Sep 27, 2023

Identified in OCP4.13 where metallb adds an annotation to the service when handling it, it resulted in reconcile loop since the current service CreateOrPatch did not expect that annotations will be altered outside the owner.

This changes the different functions to merge Labels and Annotations in CreateOr Patch instead of assigning.

Identified in OCP4.13 where metallb adds an annotation to the
service when handling it, it resulted in reconcile loop since
the current service CreateOrPatch did not expect that annotations
will be altered outside the owner.

This changes the different functions to merge Labels and Annotations
in CreateOr Patch instead of assigning.
Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

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

/lgtm

@stuggi stuggi merged commit 4f614f3 into openstack-k8s-operators:main Sep 27, 2023
Copy link
Contributor

@gibizer gibizer left a comment

Choose a reason for hiding this comment

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

I agree that we needed to do this but I wan't to note that we lost one use case by this change. Before this change we could remove a label or annotation from our CR and then it was removed from the underlying secret/cm/service resource. Now it is not possible to remove labels or annotations as Merge can always add but never remove entity.

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.

3 participants