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

Stop triggering pod restarts for CR labels/annotations updates #449

Merged
merged 3 commits into from
Nov 10, 2020

Conversation

ChunyiLyu
Copy link
Contributor

@ChunyiLyu ChunyiLyu commented Nov 9, 2020

This closes #442

Note to reviewers: remember to look at the commits in this PR and consider if they can be squashed

Summary Of Changes

  • Stop populate CR labels/annotations to pods. Instance labels and annotations are still populated and updated for statefulSet.
  • Stop updating label/annotation on server conf configMap, because updates to server-conf configMap triggers pod restart. Instance labels and annotations are still applied at creation.
    Stop updating label/annotation on plugins configmap, because updates to the plugins configMap triggers unnecessary rabbitmq-plugins set.

Additional Context

Local Testing

Have run unit, integration, and system tests.

- we don't want to trigger pod restarts for
CR labels/annotations updates
- updates to server-conf configMap triggers pod restart
- instance labels and annotations are still applied at creation
Copy link
Collaborator

@mkuratczyk mkuratczyk left a comment

Choose a reason for hiding this comment

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

As discussed - applying the labels initially but not reconciling them later feels wrong. We might want to change that in the future. But for now, at least we don't cause cluster restarts when adding labels.

controllers/rabbitmqcluster_controller_test.go Outdated Show resolved Hide resolved
internal/resource/configmap.go Show resolved Hide resolved
internal/resource/statefulset_test.go Outdated Show resolved Hide resolved
internal/resource/statefulset_test.go Outdated Show resolved Hide resolved
- this is to avoid running `rabbitmq-plugins set` everytime
the CR annotations and labels are updated.
- CR annotations and labels are still applied to plugins
configmap at creation.
@ChunyiLyu ChunyiLyu merged commit ba7d532 into main Nov 10, 2020
@ChunyiLyu ChunyiLyu deleted the label-annotation-inheritance branch November 10, 2020 09:11
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.

Setting labels via metadata.label is incompatible with Flux
3 participants