From eb53bc0f7160facc3a7b04b3f13b22483579bf6e Mon Sep 17 00:00:00 2001 From: Roman Tkachenko Date: Tue, 26 Apr 2022 12:14:49 -0700 Subject: [PATCH] Revert "Fix ProxyKube not reporting its readiness (#12150)" This reverts commit 6cdcfe772158a1ed6c0dff40636c3c44cbdc4bd5. --- integration/integration_test.go | 40 --------------------------------- lib/kube/proxy/server.go | 2 -- 2 files changed, 42 deletions(-) diff --git a/integration/integration_test.go b/integration/integration_test.go index e5c3afd34562f..979121cab9fb4 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -189,7 +189,6 @@ func TestIntegrations(t *testing.T) { t.Run("PortForwarding", suite.bind(testPortForwarding)) t.Run("ProxyHostKeyCheck", suite.bind(testProxyHostKeyCheck)) t.Run("ReverseTunnelCollapse", suite.bind(testReverseTunnelCollapse)) - t.Run("Readyz", suite.bind(testReadyz)) t.Run("RotateChangeSigningAlg", suite.bind(testRotateChangeSigningAlg)) t.Run("RotateRollback", suite.bind(testRotateRollback)) t.Run("RotateSuccess", suite.bind(testRotateSuccess)) @@ -3664,45 +3663,6 @@ func testPAM(t *testing.T, suite *integrationTestSuite) { } } -func testReadyz(t *testing.T, suite *integrationTestSuite) { - // TODO: test more service combinations - - recConfig, err := types.NewSessionRecordingConfigFromConfigFile(types.SessionRecordingConfigSpecV2{ - Mode: types.RecordOff, - }) - require.NoError(t, err) - - tconf := suite.defaultServiceConfig() - tconf.Auth.Enabled = true - tconf.Auth.SessionRecordingConfig = recConfig - tconf.Proxy.Enabled = true - tconf.Proxy.DisableWebInterface = true - tconf.Proxy.Kube.Enabled = true - // fire up the proxy kube service - tconf.Proxy.Kube.ListenAddr = utils.NetAddr{ - AddrNetwork: "tcp", - Addr: "127.0.0.1:0", - } - tconf.SSH.Enabled = false - tconf.DiagnosticAddr = utils.NetAddr{ - AddrNetwork: "tcp", - Addr: "127.0.0.1:0", - } - - teleport := suite.newTeleportWithConfig(t, nil, nil, tconf) - t.Cleanup(func() { require.NoError(t, teleport.StopAll()) }) - - diagAddr, err := teleport.Process.DiagnosticAddr() - require.NoError(t, err) - - require.Eventually(t, func() bool { - resp, err := http.Get(fmt.Sprintf("http://%s/readyz", diagAddr)) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - return resp.StatusCode == http.StatusOK - }, 5*time.Second, 500*time.Millisecond) -} - // testRotateSuccess tests full cycle cert authority rotation func testRotateSuccess(t *testing.T, suite *integrationTestSuite) { tr := utils.NewTracer(utils.ThisFunction()).Start() diff --git a/lib/kube/proxy/server.go b/lib/kube/proxy/server.go index 5ab727efab0c1..0c3cc58ab9160 100644 --- a/lib/kube/proxy/server.go +++ b/lib/kube/proxy/server.go @@ -156,8 +156,6 @@ func NewTLSServer(cfg TLSServerConfig) (*TLSServer, error) { } } else { log.Debug("No local kube credentials on proxy, will not start kubernetes_service heartbeats") - // Report the component as being ready. - cfg.OnHeartbeat(nil) } return server, nil