-
Notifications
You must be signed in to change notification settings - Fork 53
feature-gates: adding initial structure #371
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
e5fc400
to
90417f7
Compare
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.
Added some comments, however, looks like the right direction to me
90417f7
to
f9f72d8
Compare
f9f72d8
to
11fe2f3
Compare
f017991
to
5fab1eb
Compare
4c0ac35
to
7a017ac
Compare
@beraldoleal thanks! LGTM overall, couple of questions:
|
Hi @snir911 , my comments bellow:
Good question. I was planning to keep the default map empty (since is a code block) but keep the
When considering the implementation, my initial thought was to use Predicates. However, since the other watches were utilizing EventHandlers, I opted to maintain consistency and avoid a mix of approaches. To be honest, I also prefer using Predicates. If you see no issue with incorporating both EventHandlers and Predicates within the same setup, we could explore this option.
I believe it's possible, yes, but it might be unnecessary. The default values are intended for use as-is, without the need for user intervention. Introducing another ConfigMap into users' deployments for those adhering to the default values might not be ideal. The |
IDK, we can either start with a real feature (maybe peer-pods? but just print a msg instead of actually enabling it ATM?) or maybe to leave only single dummy feature?
AFAIK there's no problem to mix (we do it in the credentials controller), the handlers are usually used when there are some ops needed IIUC..
Sure, anyway we can do it at any point.. |
Currently peerpods is enabled by another way... adding peer-pods to the feature gates without disabling the other way it will be confuse. Also, if we add a new feature with just a print message (lets say "CoCo") it will give the users the wrong impression. IMO it will be confusing, because users might think this is actually enabling. If we don´t have a feature to onboard now, Keeping a single dummy feature reinforces this is fake. So it think is safe (at least until we replace it with a real feature).
Ok, I will send a new version with the Predicates. Thanks again, @snir911 . |
This commit introduces the `FeatureGates` struct in the operator's configuration, enabling a flexible and controlled approach to feature rollout. The `FeatureGates` configMap allows for the enabling or disabling of specific features, with a default behaviour based on each feature's maturity level. For each new feature, developers need to modify the "default" struct, just in case users don't have to set their desired behaviour. User's choice will override default values. I'm trying to use a simple approach here where we could change promote/depromote a feature by just changing the comments and the default values. Fixes: #KATA-2677 Signed-off-by: Beraldo Leal <[email protected]>
Basic instructions on how to use feature gates. Signed-off-by: Beraldo Leal <[email protected]>
7a017ac
to
7ac6079
Compare
@beraldoleal: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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 @beraldoleal
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 @beraldoleal
@snir911 ? |
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! (assuming it was tested)
This commit introduces the
FeatureGates
struct in the operator's configuration, enabling a flexible and controlled approach to feature rollout. TheFeatureGates
struct allows for the enabling or disabling of specific features, with a default behaviour based on each feature's maturity level.Uses Kubebuilder default value annotations for CRD fields to automatically set default behaviours in the Kubernetes API.
I'm trying to use a simple approach here where we could change promote/depromote a feature by just changing the comments and the default values.
Please let know what I'm missing (probably I'm missing a lot) and what you think about this approach.