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

Adjust health check to return 503 if all backends are down #496

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

TheBigLee
Copy link
Contributor

@TheBigLee TheBigLee commented Oct 26, 2023

What this PR does / why we need it:

If all backends are down, the haproxy instance should not be served anymore by kubernetes and the readiness probe should fail. Furthermore, we also fail the liveness probe to enforce a restart of haproxy, as this can resolve the issue in some cases (eg. network or dns issues).

Checklist

  • Chart Version bumped
  • I have run make docs
  • Variables are documented in the values.yaml using the format required by Helm-Docs.
  • PR contains the label that identifies the chart, e.g. chart/<chart-name>
  • PR contains the label that identifies the type of change, which is one of
    [ bug, enhancement, documentation, change, breaking, dependency ]

@TheBigLee TheBigLee added enhancement New feature or request chart/haproxy labels Oct 26, 2023
@TheBigLee TheBigLee requested a review from a team October 26, 2023 11:22
@TheBigLee TheBigLee force-pushed the fix/probes_backends_down branch from 05120bc to 7def4c7 Compare October 26, 2023 11:29
If all backends are down, the haproxy instance should not be served
anymore by kubernetes and the readiness probe should fail.
Furthermore, we also fail the liveness probe to enforce a restart of
haproxy, as this can resolve the issue in some cases (eg. network or dns
issues).

Signed-off-by: Nicolas Bigler <nicolas.bigler@vshn.ch>
@TheBigLee TheBigLee force-pushed the fix/probes_backends_down branch from 7def4c7 to 29a5f5a Compare October 26, 2023 11:41
Copy link
Contributor

@wejdross wejdross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

appuio/haproxy/haproxy-2.4.0.tgz Outdated Show resolved Hide resolved
appuio/haproxy/spks.values Outdated Show resolved Hide resolved
Copy link
Contributor

@zugao zugao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TheBigLee TheBigLee merged commit 1f73103 into master Oct 26, 2023
4 checks passed
@TheBigLee TheBigLee deleted the fix/probes_backends_down branch October 26, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart/haproxy enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants