-
Notifications
You must be signed in to change notification settings - Fork 1k
GITOPS-6285: reconcile operator owned labels for configMap and ignore non operator labels #1737
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
Conversation
742aaa9 to
d1764b8
Compare
4c377ec to
21f325f
Compare
svghadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alkakumari016. Left some suggestions.
Let's remove the addKubernetesData function and replace its references with your new function. I'm also thinking of limiting the changes to only those places where we're already updating labels and annotations, to keep the testing scope small.
We can introduce label/annotation checks on resources that don’t currently have them in a separate PR.
607395d to
daea48c
Compare
… non operator labels Signed-off-by: Alka Kumari <[email protected]>
Signed-off-by: Alka Kumari <[email protected]>
Signed-off-by: Alka Kumari <[email protected]>
Signed-off-by: Alka Kumari <[email protected]>
Signed-off-by: Alka Kumari <[email protected]>
Signed-off-by: Alka Kumari <[email protected]>
…th UpdateMapValues Signed-off-by: Alka Kumari <[email protected]> GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues
…efulset Signed-off-by: Alka Kumari <[email protected]>
8e294ce to
8f044d5
Compare
Signed-off-by: Alka Kumari <[email protected]>
8f044d5 to
abaa47d
Compare
svghadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @alkakumari016
…rator labels (argoproj-labs#1737) * GITOPS-6285: reconcile operator owned labels for configMap and ignore non operator labels Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: added reconcilialtion logic for labels Signed-off-by: Alka Kumari <[email protected]> * Removed a typo that resulted in test case failures Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: error handling for r.Client.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: use r.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed func name to UpdateMapValues and added test cases Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues Signed-off-by: Alka Kumari <[email protected]> GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues * GITOPS-6285: removed labels update logic from applicationset and statefulset Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed comments Signed-off-by: Alka Kumari <[email protected]> --------- Signed-off-by: Alka Kumari <[email protected]>
…rator labels (argoproj-labs#1737) * GITOPS-6285: reconcile operator owned labels for configMap and ignore non operator labels Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: added reconcilialtion logic for labels Signed-off-by: Alka Kumari <[email protected]> * Removed a typo that resulted in test case failures Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: error handling for r.Client.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: use r.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed func name to UpdateMapValues and added test cases Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues Signed-off-by: Alka Kumari <[email protected]> GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues * GITOPS-6285: removed labels update logic from applicationset and statefulset Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed comments Signed-off-by: Alka Kumari <[email protected]> --------- Signed-off-by: Alka Kumari <[email protected]>
…rator labels (argoproj-labs#1737) * GITOPS-6285: reconcile operator owned labels for configMap and ignore non operator labels Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: added reconcilialtion logic for labels Signed-off-by: Alka Kumari <[email protected]> * Removed a typo that resulted in test case failures Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: error handling for r.Client.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: use r.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed func name to UpdateMapValues and added test cases Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues Signed-off-by: Alka Kumari <[email protected]> GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues * GITOPS-6285: removed labels update logic from applicationset and statefulset Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed comments Signed-off-by: Alka Kumari <[email protected]> --------- Signed-off-by: Alka Kumari <[email protected]>
…rator labels (argoproj-labs#1737) * GITOPS-6285: reconcile operator owned labels for configMap and ignore non operator labels Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: added reconcilialtion logic for labels Signed-off-by: Alka Kumari <[email protected]> * Removed a typo that resulted in test case failures Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: error handling for r.Client.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: use r.Update Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed func name to UpdateMapValues and added test cases Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues Signed-off-by: Alka Kumari <[email protected]> GITOPS-6285: removed addKubernetesData and replaced the references with UpdateMapValues * GITOPS-6285: removed labels update logic from applicationset and statefulset Signed-off-by: Alka Kumari <[email protected]> * GITOPS-6285: changed comments Signed-off-by: Alka Kumari <[email protected]> --------- Signed-off-by: Alka Kumari <[email protected]>
What does this PR do / why we need it:
This PR adds reconcile logic for operator owned labels of ConfigMaps. The labels are reconciled to it's desired values whenever their is any change and ignores the labels that are not owned by the operator
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
https://issues.redhat.com/browse/GITOPS-6285
Fixes #?
How to test changes / Special notes to the reviewer: