Skip to content

Commit

Permalink
Merge pull request #1813 from vmware-tanzu/disable_feature_gate
Browse files Browse the repository at this point in the history
Disable UnauthenticatedHTTP2DOSMitigation feature gate
  • Loading branch information
benjaminapetersen authored Dec 12, 2023
2 parents 461e272 + a488350 commit a58649f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions internal/concierge/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer"
apimachineryversion "k8s.io/apimachinery/pkg/version"
openapinamer "k8s.io/apiserver/pkg/endpoints/openapi"
"k8s.io/apiserver/pkg/features"
genericapiserver "k8s.io/apiserver/pkg/server"
genericoptions "k8s.io/apiserver/pkg/server/options"
"k8s.io/client-go/rest"
Expand All @@ -28,7 +27,6 @@ import (
"go.pinniped.dev/internal/concierge/apiserver"
conciergescheme "go.pinniped.dev/internal/concierge/scheme"
"go.pinniped.dev/internal/config/concierge"
"go.pinniped.dev/internal/config/featuregates"
"go.pinniped.dev/internal/controller/authenticator/authncache"
"go.pinniped.dev/internal/controllerinit"
"go.pinniped.dev/internal/controllermanager"
Expand Down Expand Up @@ -105,8 +103,10 @@ func addCommandlineFlagsToCommand(cmd *cobra.Command, app *App) {
// Boot the aggregated API server, which will in turn boot the controllers.
// In practice, the ctx passed in should be one which will be cancelled when the process receives SIGTERM or SIGINT.
func (a *App) runServer(ctx context.Context) error {
// Enable the feature gate from https://github.com/kubernetes/kubernetes/pull/121120.
featuregates.EnableKubeFeatureGate(features.UnauthenticatedHTTP2DOSMitigation)
// We tried to enable the feature gate from https://github.com/kubernetes/kubernetes/pull/121120,
// but it causes errors when there are lots of parallel anonymous requests for our aggregated API endpoints.
// We will need to figure out if that is a bug in Kubernetes before we enable this again.
// featuregates.EnableKubeFeatureGate(features.UnauthenticatedHTTP2DOSMitigation)

// Read the server config file.
cfg, err := concierge.FromPath(ctx, a.configPath)
Expand Down
8 changes: 4 additions & 4 deletions internal/supervisor/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
apimachineryversion "k8s.io/apimachinery/pkg/version"
genericapifilters "k8s.io/apiserver/pkg/endpoints/filters"
openapinamer "k8s.io/apiserver/pkg/endpoints/openapi"
"k8s.io/apiserver/pkg/features"
genericapiserver "k8s.io/apiserver/pkg/server"
genericoptions "k8s.io/apiserver/pkg/server/options"
k8sinformers "k8s.io/client-go/informers"
Expand All @@ -44,7 +43,6 @@ import (
supervisorinformers "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions"
supervisoropenapi "go.pinniped.dev/generated/latest/client/supervisor/openapi"
"go.pinniped.dev/internal/apiserviceref"
"go.pinniped.dev/internal/config/featuregates"
"go.pinniped.dev/internal/config/supervisor"
"go.pinniped.dev/internal/controller/apicerts"
"go.pinniped.dev/internal/controller/supervisorconfig"
Expand Down Expand Up @@ -388,8 +386,10 @@ func prepareControllers(
// and start serving the health endpoint and the endpoints of the configured FederationDomains.
// In practice, the ctx passed in should be one which will be cancelled when the process receives SIGTERM or SIGINT.
func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervisor.Config) error { //nolint:funlen
// Enable the feature gate from https://github.com/kubernetes/kubernetes/pull/121120.
featuregates.EnableKubeFeatureGate(features.UnauthenticatedHTTP2DOSMitigation)
// We tried to enable the feature gate from https://github.com/kubernetes/kubernetes/pull/121120,
// but it causes errors when there are lots of parallel anonymous requests for our aggregated API endpoints.
// We will need to figure out if that is a bug in Kubernetes before we enable this again.
// featuregates.EnableKubeFeatureGate(features.UnauthenticatedHTTP2DOSMitigation)

serverInstallationNamespace := podInfo.Namespace
clientSecretSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix)
Expand Down

0 comments on commit a58649f

Please sign in to comment.