From 758995750d262fcdcf6014ede04af23cd225cec2 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Sat, 7 Oct 2023 15:25:46 +0200 Subject: [PATCH] server: disable autoscaling APIs Signed-off-by: Dr. Stefan Schimanski --- pkg/server/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 1d27a6062403..adc73c8cbbad 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -25,8 +25,6 @@ import ( "os" "time" - "github.com/kcp-dev/logicalcluster/v3" - extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -43,6 +41,7 @@ import ( "k8s.io/klog/v2" controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" "k8s.io/kubernetes/pkg/controlplane/apiserver/miniaggregator" + autoscalingrest "k8s.io/kubernetes/pkg/registry/autoscaling/rest" flowcontrolrest "k8s.io/kubernetes/pkg/registry/flowcontrol/rest" configroot "github.com/kcp-dev/kcp/config/root" @@ -55,6 +54,7 @@ import ( virtualrootapiserver "github.com/kcp-dev/kcp/pkg/virtual/framework/rootapiserver" "github.com/kcp-dev/kcp/sdk/apis/core" corev1alpha1 "github.com/kcp-dev/kcp/sdk/apis/core/v1alpha1" + "github.com/kcp-dev/logicalcluster/v3" ) const resyncPeriod = 10 * time.Hour @@ -111,7 +111,8 @@ func NewServer(c CompletedConfig) (*Server, error) { for i := range allStorageProviders { switch allStorageProviders[i].(type) { case flowcontrolrest.RESTStorageProvider: - // TODO(sttts): remove this code when P&F is wired + // TODO(sttts): remove this code when P&F is wired + case autoscalingrest.RESTStorageProvider: default: storageProviders = append(storageProviders, allStorageProviders[i]) }