-
Notifications
You must be signed in to change notification settings - Fork 49
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
Optimize Registration Logic for Snapshot Compaction controller #671
Optimize Registration Logic for Snapshot Compaction controller #671
Conversation
/test pull-etcd-druid-e2e-kind-alpha-features |
Taking an example of KAPI feature-gates, you can see that once the feature is GA then it is always enabled and cannot be disabled. This is how feature-gates are used in several k8s components. A CLI flag for the same has a different purpose and that is to enable or disable a feature/functionality irrespective of its state (alpha/beta/GA). Q: What is our interpretation of feature gates? Is it in line with all upstream k8s components or is it used to disable/enable features/functionality irrespective of its state(alpha/beta/GA)? The reason i asked this question is that you have put this feature gate along with etcd-wrapper feature gate. Once etcd-wrapper feature gate is GA, then it will always be used and there will not be any option to disable it. Also have a look at Feature-Gates-Removed where a lot of GA feature gates have been removed as for GA features, consumers cannot influence the decision to include or exclude them. My recommendation is to have only a single interpretation of feature gates. One cannot have both interpretations. For example for etcd-events there are no snapshot leases and therefore you would always want to disable compaction controller for etcd-events. From this perspective it is not really a feature gate (if you interpret it the way upstream k8s does it and also the way it has been done for etcd-wrapper). |
EnableSnapshotCompaction
Refine the approach to registering snapshot compaction controller. Instead of always running the compaction-controller and checking the CLI flag `--enable-backup-compaction` just before deploying the compaction job, the updated logic registers the compaction-controller based on the CLI flag `--enable-backup-compaction`.
a603972
to
234c2ee
Compare
/test all |
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.
@seshachalam-yv thanks for making the required changes.
/lgtm
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 for the PR. LGTM
How to categorize this PR?
/area storage
/kind enhancement
What this PR does / why we need it:
This PR optimizes the logic behind registering snapshot compaction-controller. Instead of always running the compaction-controller and checking the CLI flag
--enable-backup-compaction
just before deploying the compaction job, the new approach registers the compaction-controller based on the presence of the CLI flag--enable-backup-compaction
.Which issue(s) this PR fixes:
Fixes #655 (comment)
Special notes for your reviewer:
Release note: