diff --git a/deploy/auth-deployment.yaml b/deploy/auth-deployment.yaml index f6c35e9..2f3cefa 100644 --- a/deploy/auth-deployment.yaml +++ b/deploy/auth-deployment.yaml @@ -25,7 +25,7 @@ spec: name: auth-config readinessProbe: httpGet: - path: /api/v1/health + path: /api/v1/healthz port: 9994 periodSeconds: 1 initialDelaySeconds: 3 diff --git a/internal/auth.go b/internal/auth.go index 75238bd..c45762a 100644 --- a/internal/auth.go +++ b/internal/auth.go @@ -32,7 +32,7 @@ func NewServer(ctx context.Context, config *config.Config) *AuthServer { } // - s.Router.Get("/api/v1/health", health(s)) + s.Router.Get("/api/v1/healthz", healthz(s)) // s.Router.Post("/api/v1/login", login(s)) @@ -46,9 +46,9 @@ func (s *AuthServer) GracefulStop() error { return s.db.Close() } -func health(s *AuthServer) http.HandlerFunc { +func healthz(s *AuthServer) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) w.Write([]byte("ok")) } }