-
Notifications
You must be signed in to change notification settings - Fork 517
feat(pkg): support modifying feature gates #6226
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
feat(pkg): support modifying feature gates #6226
Conversation
/run-pull-e2e-kind-v2 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/v2 #6226 +/- ##
=============================================
Coverage ? 46.68%
=============================================
Files ? 298
Lines ? 19637
Branches ? 0
=============================================
Hits ? 9168
Misses ? 10469
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
/run-pull-e2e-kind-v2 |
pkg/controllers/common/task.go
Outdated
func featuresUpToDate(c *v1alpha1.Cluster, fs []metav1alpha1.Feature) bool { | ||
if len(fs) != len(c.Spec.FeatureGates) { | ||
return false | ||
} | ||
|
||
for i, f := range fs { | ||
if c.Spec.FeatureGates[i].Name != f { | ||
return false | ||
} | ||
} | ||
|
||
return true | ||
} | ||
|
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.
Do not need to sort?
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.
it's ordered by users.
if f, ok := spec["features"]; ok { | ||
specCopy["features"] = f | ||
} | ||
template["$patch"] = "replace" | ||
objCopy["spec"] = specCopy | ||
patch, err := json.Marshal(objCopy) | ||
|
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.
Will this make existing clusters restart?
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.
revision will be changed.
pkg/reloadable/common.go
Outdated
func equalFeatures[ | ||
A ~string, | ||
B ~string, | ||
](a []A, b []B) bool { | ||
if len(a) != len(b) { | ||
return false | ||
} | ||
|
||
for i := range a { | ||
if string(a[i]) != string(b[i]) { | ||
return false | ||
} | ||
} | ||
|
||
return true | ||
} |
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.
Need to sort?
bf8de0b
to
c01f79e
Compare
Signed-off-by: liubo02 <[email protected]>
Signed-off-by: liubo02 <[email protected]>
/run-pull-e2e-kind-v2 |
c01f79e
to
6c481cb
Compare
/run-pull-e2e-kind-v2 |
Signed-off-by: liubo02 <[email protected]>
/run-pull-e2e-kind-v2 |
Signed-off-by: liubo02 <[email protected]>
/run-pull-e2e-kind-v2 |
/lgtm |
/test pull-e2e |
@liubog2008: The following test 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-sigs/prow repository. I understand the commands that are listed here. |
/run-pull-e2e-kind-v2 |
Signed-off-by: liubo02 <[email protected]>
/run-pull-e2e-kind-v2 |
1 similar comment
/run-pull-e2e-kind-v2 |
Signed-off-by: liubo02 <[email protected]>
/run-pull-e2e-kind-v2 |
/run-pull-e2e-kind-v2 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fgksgf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
Ref: #6199
FeatureModification
if it is not enabledFeatureModification
manually test:
DisablePDDefaultReadinessProbe
feature.FeatureModification
DisablePDDefaultReadinessProbe