Skip to content

remove last applied replicas when statefulset is changed #16

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

Merged
merged 6 commits into from
May 15, 2025

Conversation

yuchen-db
Copy link

@yuchen-db yuchen-db commented May 15, 2025

add a logic in rollout operator to remove last applied replicas when statefulset is changed. This should prevent any surprise when we omit replicas value from manifest and trigger a client-side apply

@yuchen-db yuchen-db force-pushed the yuchen-db/remove-last-applied-replicas branch from 19adfe7 to b2594be Compare May 15, 2025 21:25
@yuchen-db yuchen-db changed the title add a flag to remove last applied replicas remove last applied replicas when statefulset is changed May 15, 2025
@yuchen-db yuchen-db requested review from jnyi and hczhu-db May 15, 2025 22:44
Copy link

@jnyi jnyi left a comment

Choose a reason for hiding this comment

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

will it be added back causing race condition? would you mind testing:

  1. only deploy rollout-operator
  2. check the specific key is removed
  3. kubecfg apply ONLY the db statefulset
  4. the keys are not added back

@yuchen-db
Copy link
Author

will it be added back causing race condition? would you mind testing:

  1. only deploy rollout-operator
  2. check the specific key is removed
  3. kubecfg apply ONLY the db statefulset
  4. the keys are not added back

two cases for step 3:
a. replicas field is omitted, then the keys will not be added back
b. replicas field exists, then the keys will be added back, but will be removed shortly at next reconcile

@yuchen-db yuchen-db merged commit 2301276 into db_main May 15, 2025
5 checks passed
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.

2 participants