-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove deprecated flags in controller manager options #7271
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,12 +37,6 @@ func (o *Options) Validate() field.ErrorList { | |
| if o.ClusterStatusUpdateFrequency.Duration <= 0 { | ||
| errs = append(errs, field.Invalid(newPath.Child("ClusterStatusUpdateFrequency"), o.ClusterStatusUpdateFrequency, "must be greater than 0")) | ||
| } | ||
| if o.ClusterLeaseDuration.Duration <= 0 { | ||
| errs = append(errs, field.Invalid(newPath.Child("ClusterLeaseDuration"), o.ClusterLeaseDuration, "must be greater than 0")) | ||
| } | ||
| if o.ClusterLeaseRenewIntervalFraction <= 0 || o.ClusterLeaseRenewIntervalFraction >= 1 { | ||
| errs = append(errs, field.Invalid(newPath.Child("ClusterLeaseRenewIntervalFraction"), o.ClusterLeaseRenewIntervalFraction, "must be greater than 0 and less than 1")) | ||
| } | ||
| if o.ClusterMonitorPeriod.Duration <= 0 { | ||
| errs = append(errs, field.Invalid(newPath.Child("ClusterMonitorPeriod"), o.ClusterMonitorPeriod, "must be greater than 0")) | ||
| } | ||
|
Comment on lines
37
to
42
|
||
|
|
||
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.
Removing these flag bindings also removes the only place
ClusterLeaseDurationandClusterLeaseRenewIntervalFractionget non-zero defaults.NewOptions()currently leaves them at zero values, butopts.Validate()requiresClusterLeaseDuration > 0and0 < ClusterLeaseRenewIntervalFraction < 1, sokarmada-controller-managerwill now fail to start. Set defaults for these fields inNewOptions()(e.g., 40s and 0.25 as before) or remove/adjust the validation + downstream usage if they are truly no longer needed.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.
As per discussed here #7009 (comment), we will stop populating these fields. I removed the validation checks on these 2 fields