Skip to content

Commit

Permalink
Avoid fatal errors for unknown features flags that can be added in a …
Browse files Browse the repository at this point in the history
…future release (#8051)

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
  • Loading branch information
pierDipi committed Jun 27, 2024
1 parent a6ac811 commit 6992e6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/apis/feature/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package feature

import (
"fmt"
"log"
"strings"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -186,7 +187,8 @@ func NewFlagsConfigFromMap(data map[string]string) (Flags, error) {
} else if strings.Contains(k, NodeSelectorLabel) {
flags[sanitizedKey] = Flag(v)
} else {
return flags, fmt.Errorf("cannot parse the feature flag '%s' = '%s'", k, v)
flags[k] = Flag(v)
log.Printf("Warning: unknown feature flag value %q=%q\n", k, v)
}
}

Expand Down

0 comments on commit 6992e6f

Please sign in to comment.