From 9844402a90618053de8cb6e6cac795f5f00228d7 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 4 Jun 2024 20:55:42 +0000 Subject: [PATCH] define some default kube-apiserver flags for tests disabling unneded controllers --- test/integration/framework/controlplane_utils.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/integration/framework/controlplane_utils.go b/test/integration/framework/controlplane_utils.go index 2af4f1a4f1b..30ef35663bf 100644 --- a/test/integration/framework/controlplane_utils.go +++ b/test/integration/framework/controlplane_utils.go @@ -98,3 +98,11 @@ func SharedEtcd() *storagebackend.Config { cfg.Transport.ServerList = []string{GetEtcdURL()} return cfg } + +// DefaultAPIServerFlags returns the default flags used to run kube-apiserver on tests +func DefaultTestServerFlags() []string { + return []string{ + "--endpoint-reconciler-type=none", // Disable Endpoints Reconciler so it does not keep failing trying to use 127.0.0.1 as a valid Endpoint. + "--disable-admission-plugins=ServiceAccount", // Disable ServiceAccount admission plugin as we don't have serviceaccount controller running. + } +}