Skip to content

Configure Healthz and Readyz endpoints #2012

Closed
@a-hilaly

Description

@a-hilaly

currently our controllers are lacking essential /healthz and /readyz endpoints for monitoring service health and readiness. To address this, we can utilize controller-runtime (healthz and readyz libraries).

We will also need necessary to add configurations for deployment manifests and helm charts readinessProbe and livenessProbe. .

Changes needs to be added to the code-generator main.go.tpl and should be as easy as:

    if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
        setupLog.Error(err, "unable to set up health check")
        os.Exit(1)
    }
    if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
        setupLog.Error(err, "unable to set up ready check")
        os.Exit(1)
    }

Metadata

Metadata

Assignees

Labels

area/runtimeIssues or PRs as related to controller runtime, common reconciliation logic, etcgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions