Skip to content

fix(k8s): honor health_check.enabled in the deployment template - #257

Merged
fedemaleh merged 2 commits into
betafrom
fix/health-check-disabled
Sep 11, 2026
Merged

fedemaleh merged 2 commits into
betafrom
fix/health-check-disabled

Conversation

@fedemaleh

@fedemaleh fedemaleh commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

What

health_check.enabled has been in the scope schema since the first commit and no template ever read it — turning the health check off hid the other health-check fields in the form and changed nothing else. The deployment template now drops the liveness, readiness and startup probes from all four containers (main traffic-manager sidecar, HTTP and GRPC additional-port sidecars, application) when the flag is explicitly false. azure and azure-aro reuse this template, so they get the fix too.

Why we want it

An application that does not serve the health endpoint is killed in a restart loop while the UI says its health check is off.

The criterion behind the fix

Probes are removed only when the key is present and false. Scopes created before the flag existed have no enabled key at all — the schema default applies at creation, not retroactively — so a plain truthiness check would have stripped the probes from every legacy scope on its next deploy. The render for enabled: true, for a missing key, and for type: TCP is byte-identical to beta.

Deliberately not done: the ALB healthcheck-* annotations in service.yaml.tpl are untouched. AWS always health-checks a target group, so that stays the backstop for ALB-fronted traffic — and the limitation is that such a target can remain unhealthy. It needs its own decision.

Covered by k8s/deployment/tests/health_check_disabled.bats.

@fedemaleh
fedemaleh merged commit 919bc8f into beta Sep 11, 2026
3 checks passed
@fedemaleh
fedemaleh deleted the fix/health-check-disabled branch September 11, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants