Skip to content

Commit

Permalink
Revert "Fix ProxyKube not reporting its readiness (#12153)"
Browse files Browse the repository at this point in the history
This reverts commit b924b40.
  • Loading branch information
r0mant committed Apr 26, 2022
1 parent 0588b69 commit 1fc5419
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
40 changes: 0 additions & 40 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,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))
Expand Down Expand Up @@ -3619,45 +3618,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()
Expand Down
2 changes: 0 additions & 2 deletions lib/kube/proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fc5419

Please sign in to comment.