PSRule.Rules.Azure
PSRule.Rules.Azure copied to clipboard
[RULE] Container App Health Probe that support HTTP
Existing rule
No response
Suggested rule
If the container app uses HTTP based ingress, then health probes should be properly configured to support HTTP.
- If
properties.configuration.ingress.transport=httporhttp2OR - If
properties.configuration.ingress.targetPort=80or8080or443
Health probes should be configured to support HTTP which has a granular status instead of open or closed that a TCP port has, to determine if a replica is available and ready to receive the ingress traffic.
Key points:
- The default health probes use TCP, so no health probes configured is a fail.
- Start up probe is often configured as TCP for several reasons to start the container so ignore that probe.
- Check that
LivenessandReadinesshavehttpGetconfigured.
Pillar
Reliability
Additional context
Similar to: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppService.WebProbe/
- https://learn.microsoft.com/en-gb/azure/container-apps/health-probes?tabs=arm-template
- https://learn.microsoft.com/en-gb/azure/templates/microsoft.app/containerapps?pivots=deployment-language-bicep#ingress