Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Healthz and Readyz endpoints #2012

Closed
a-hilaly opened this issue Feb 10, 2024 · 0 comments
Closed

Configure Healthz and Readyz endpoints #2012

a-hilaly opened this issue Feb 10, 2024 · 0 comments
Assignees
Labels
area/runtime Issues or PRs as related to controller runtime, common reconciliation logic, etc good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@a-hilaly
Copy link
Member

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)
    }
@a-hilaly a-hilaly added area/runtime Issues or PRs as related to controller runtime, common reconciliation logic, etc kind/feature Categorizes issue or PR as related to a new feature. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Feb 10, 2024
a-hilaly added a commit to a-hilaly/ack-runtime that referenced this issue Feb 17, 2024
Part of aws-controllers-k8s/community#2012

This patch adds a new flag to all the controllers, allowing users and
operators to setup a healthz endpoint. Very rarely those flags (Healthz
and Metrics) and modified by users, so we're assigning them distinct ports
(8080 and 8081).

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
ack-prow bot pushed a commit to aws-controllers-k8s/runtime that referenced this issue Feb 17, 2024
Part of aws-controllers-k8s/community#2012

This patch adds a new flag to all the controllers, allowing users and
operators to setup a healthz endpoint. Very rarely those flags (Healthz
and Metrics) and modified by users, so we're assigning them distinct ports
(8080 and 8081).

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
ack-prow bot pushed a commit to aws-controllers-k8s/code-generator that referenced this issue Feb 19, 2024
)

Part of aws-controllers-k8s/community#2012

This patch enhances controller availability by introducing liveness and
readiness probes. By configuring /healthz and /readyz endpoints for all
the controllers, the deployments can now effectively monitor their
health status.

While it's still a simple ping/pong healthz endpoints. We're laying the
ground for future more complex healthz and readiness checks. Thinking
something like checking that the CARM informer health...

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@a-hilaly a-hilaly self-assigned this Feb 22, 2024
ack-prow bot pushed a commit to aws-controllers-k8s/code-generator that referenced this issue Feb 22, 2024
Pin ACK runtime to v0.31.0. Mainly addressing two github issues:
- Healthz, liveness and readiness probes aws-controllers-k8s/community#2012
- CARM Race condition and scaling issues aws-controllers-k8s/community#2011

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
ndbhat pushed a commit to ndbhat/ack-runtime that referenced this issue Apr 16, 2024
Part of aws-controllers-k8s/community#2012

This patch adds a new flag to all the controllers, allowing users and
operators to setup a healthz endpoint. Very rarely those flags (Healthz
and Metrics) and modified by users, so we're assigning them distinct ports
(8080 and 8081).

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Issues or PRs as related to controller runtime, common reconciliation logic, etc good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant