Skip to content
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

Update allowed components to reflect other things that run in knative-serving #8513

Merged
Merged
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
10 changes: 2 additions & 8 deletions config/core/configmaps/leader-election.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
labels:
serving.knative.dev/release: devel
annotations:
knative.dev/example-checksum: 2a1bda27
knative.dev/example-checksum: 83d5c126
data:
_example: |
################################
Expand Down Expand Up @@ -57,10 +57,4 @@ data:
retryPeriod: "2s"
# enabledComponents is a comma-delimited list of component names for which
# leader election is enabled. Valid values are:
#
# - controller
# - hpaautoscaler
# - certcontroller
# - istiocontroller
# - nscontroller
enabledComponents: "controller,hpaautoscaler,certcontroller,istiocontroller,nscontroller,webhook"
enabledComponents: "controller,contour-ingress-controller,hpaautoscaler,certcontroller,istiocontroller,net-http01,nscontroller,webhook"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(lacking context) why is this not an array?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configmaps are map[string]string

2 changes: 2 additions & 0 deletions pkg/leaderelection/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ import (
var (
validComponents = sets.NewString(
"controller",
"contour-ingress-controller",
"hpaautoscaler",
"certcontroller",
"istiocontroller",
"net-http01",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be pushed to their own repos at some point?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how we've centralized this configmap validation it's not really plausible right now. However, I'd like to move to enable this by default and eliminate this flag ASAP in 0.17.

"nscontroller",
"webhook",
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/leaderelection/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestValidateConfig(t *testing.T) {
data["enabledComponents"] = "controller,frobulator"
return data
}(),
err: errors.New(`invalid enabledComponent "frobulator": valid values are ["certcontroller" "controller" "hpaautoscaler" "istiocontroller" "nscontroller" "webhook"]`),
err: errors.New(`invalid enabledComponent "frobulator": valid values are ["certcontroller" "contour-ingress-controller" "controller" "hpaautoscaler" "istiocontroller" "net-http01" "nscontroller" "webhook"]`),
}}

for _, tc := range cases {
Expand All @@ -95,6 +95,7 @@ func TestValidateConfig(t *testing.T) {
})
}
}

func TestServingConfig(t *testing.T) {
actual, example := ConfigMapsFromTestFile(t, "config-leader-election")
for _, test := range []struct {
Expand Down