From 32f073e75b570cca3f98dd364fd1cc9708fc733f Mon Sep 17 00:00:00 2001 From: rosstimothy <39066650+rosstimothy@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:36:10 -0500 Subject: [PATCH] Disable unused services in Kubernetes tests (#62247) --- integration/kube_integration_test.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/integration/kube_integration_test.go b/integration/kube_integration_test.go index 6ecc46df483..87cea96b0b4 100644 --- a/integration/kube_integration_test.go +++ b/integration/kube_integration_test.go @@ -78,6 +78,7 @@ import ( "github.com/gravitational/teleport/lib/auth/authclient" "github.com/gravitational/teleport/lib/auth/testauthority" "github.com/gravitational/teleport/lib/client" + "github.com/gravitational/teleport/lib/cloud/imds" "github.com/gravitational/teleport/lib/defaults" kubeutils "github.com/gravitational/teleport/lib/kube/utils" "github.com/gravitational/teleport/lib/modules" @@ -2032,24 +2033,28 @@ type sessionMetadataResponse struct { func (s *KubeSuite) teleKubeConfig(hostname string) *servicecfg.Config { tconf := servicecfg.MakeDefaultConfig() tconf.Logger = s.log - tconf.SSH.Enabled = true + tconf.SSH.Enabled = false tconf.Proxy.DisableWebInterface = true + tconf.Proxy.DisableDatabaseProxy = true tconf.PollingPeriod = 500 * time.Millisecond tconf.Testing.ClientTimeout = time.Second tconf.Testing.ShutdownTimeout = 2 * tconf.Testing.ClientTimeout + tconf.CircuitBreakerConfig = breaker.NoopBreakerConfig() + tconf.InstanceMetadataClient = imds.NewDisabledIMDSClient() + tconf.DebugService.Enabled = false + tconf.Proxy.IdP.SAMLIdP.Enabled = false // set kubernetes specific parameters tconf.Proxy.Kube.Enabled = true tconf.Proxy.Kube.ListenAddr.Addr = net.JoinHostPort(hostname, newPortStr()) tconf.Proxy.Kube.KubeconfigPath = s.kubeConfigPath tconf.Proxy.Kube.LegacyKubeProxy = true - tconf.CircuitBreakerConfig = breaker.NoopBreakerConfig() return tconf } -// teleKubeConfig sets up teleport with kubernetes turned on -func (s *KubeSuite) teleAuthConfig(hostname string) *servicecfg.Config { +// teleAuthConfig sets up teleport with Auth turned on +func (s *KubeSuite) teleAuthConfig() *servicecfg.Config { tconf := servicecfg.MakeDefaultConfig() tconf.Logger = s.log tconf.PollingPeriod = 500 * time.Millisecond @@ -2058,6 +2063,7 @@ func (s *KubeSuite) teleAuthConfig(hostname string) *servicecfg.Config { tconf.Proxy.Enabled = false tconf.SSH.Enabled = false tconf.CircuitBreakerConfig = breaker.NoopBreakerConfig() + tconf.DebugService.Enabled = false return tconf } @@ -2955,7 +2961,7 @@ func testExecNoAuth(t *testing.T, suite *KubeSuite) { }) require.NoError(t, err) teleport.AddUserWithRole(userUsername, userRole) - authTconf := suite.teleAuthConfig(Host) + authTconf := suite.teleAuthConfig() err = teleport.CreateEx(t, nil, authTconf) require.NoError(t, err) err = teleport.Start()