Skip to content

Commit

Permalink
feat: do not include kube-api check in application liveness flow (#4163)
Browse files Browse the repository at this point in the history
* feat: do not include kube-api liveness check in application liveness flow
  • Loading branch information
olegsu committed Aug 26, 2020
1 parent 569a2a6 commit 3a50f8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions controller/appcontroller.go
Expand Up @@ -177,8 +177,7 @@ func NewApplicationController(
})
metricsAddr := fmt.Sprintf("0.0.0.0:%d", metricsPort)
ctrl.metricsServer = metrics.NewMetricsServer(metricsAddr, appLister, func() error {
_, err := kubeClientset.Discovery().ServerVersion()
return err
return nil
})
stateCache := statecache.NewLiveStateCache(db, appInformer, ctrl.settingsMgr, kubectl, ctrl.metricsServer, ctrl.handleObjectUpdated)
appStateManager := NewAppStateManager(db, applicationClientset, repoClientset, namespace, kubectl, ctrl.settingsMgr, stateCache, projInformer, ctrl.metricsServer)
Expand Down
6 changes: 2 additions & 4 deletions server/server.go
Expand Up @@ -577,8 +577,7 @@ func withRootPath(handler http.Handler, a *ArgoCDServer) http.Handler {
mux.Handle("/"+root+"/", http.StripPrefix("/"+root, handler))

healthz.ServeHealthCheck(mux, func() error {
_, err := a.KubeClientset.(*kubernetes.Clientset).ServerVersion()
return err
return nil
})

return mux
Expand Down Expand Up @@ -645,8 +644,7 @@ func (a *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWebHandl
// Swagger UI
swagger.ServeSwaggerUI(mux, assets.SwaggerJSON, "/swagger-ui", a.RootPath)
healthz.ServeHealthCheck(mux, func() error {
_, err := a.KubeClientset.(*kubernetes.Clientset).ServerVersion()
return err
return nil
})

// Dex reverse proxy and client app and OAuth2 login/callback
Expand Down

0 comments on commit 3a50f8d

Please sign in to comment.