Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/config/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ func (fg *FeatureGates) validateFeatureGates() error {

switch fg.FeatureSet {
case "":
if len(fg.CustomNoUpgrade.Enabled) > 0 || len(fg.CustomNoUpgrade.Disabled) > 0 {
return fmt.Errorf("CustomNoUpgrade enabled/disabled lists must be empty when FeatureSet is empty")
}
return nil
case FeatureSetCustomNoUpgrade:
// Valid - continue with validation
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func TestValidate(t *testing.T) {
c.ApiServer.FeatureGates.CustomNoUpgrade.Disabled = []string{"feature2"}
return c
}(),
expectErr: false,
expectErr: true,
},
{
name: "feature-gates-custom-no-upgrade-valid",
Expand Down