-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add featuregate package and use it in controllers #673
Add featuregate package and use it in controllers #673
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 8534567081Details
💛 - Coveralls |
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
@@ -58,7 +59,8 @@ const nodePolicySyncEventName = "node-policy-sync-event" | |||
// SriovNetworkNodePolicyReconciler reconciles a SriovNetworkNodePolicy object | |||
type SriovNetworkNodePolicyReconciler struct { | |||
client.Client | |||
Scheme *runtime.Scheme | |||
Scheme *runtime.Scheme | |||
FeatureGate featuregate.FeatureGate |
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.
This field is not used. I guess it will be used in some future PR, right?
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.
Yes, this is preparation for the next PR.
pkg/featuregate/featuregate.go
Outdated
// completely removes the previous state | ||
Init(features map[string]bool) | ||
// Set state of the specific feature, keeps existing state for other features | ||
Set(feature string, state bool) |
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.
Same here, Set
seems to be used in tests only. How is it going to be used?
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.
The Set
hadler was added to provide API completeness. There is no real reason to keep it. I will drop it.
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.
@zeeke I removed Set
function
This package is required to simplify usage of feature gates outside of the SriovOperatorConfig controller Signed-off-by: Yury Kulazhenkov <[email protected]>
Use featuregate package in SriovOperatorConfig and in SriovNetworkNodePolicy controllers Signed-off-by: Yury Kulazhenkov <[email protected]>
7ee5f13
to
3b4bc74
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Thanks for your PR,
To skip the vendors CIs use one of:
|
@zeeke Can we merge this PR if it looks good for you? thx |
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
I was waiting for the CI to finish
This change is required to simplify usage of feature gates outside of SriovOperatorConfig controller.
SriovOperatorConfig controller is responsible for initialization of the featuregate helper.
Other controllers can check configured feature gates by using the interface.