Add Azure.ContainerApp.HealthProbe rule (AZR-000537)#3720
Conversation
…probe checks Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/PSRule.Rules.Azure/sessions/9bd40ff2-e52b-4e37-8cd4-2f3a82a979db
|
@copilot can you define the rule in YAML instead. |
Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/PSRule.Rules.Azure/sessions/2e3e1e50-6ac6-4f43-ad05-caabf4076f28
Done in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Add an addition test resource configuration for cases configured with |
|
@copilot Use the ruleset |
Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/PSRule.Rules.Azure/sessions/193049a1-b5b9-4715-ae49-a41c2411fa36
Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/PSRule.Rules.Azure/sessions/5bdacc1d-dd37-4fff-b0e2-023d06a15bd2
Updated in commit |
|
@copilot use rule ID |
Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/PSRule.Rules.Azure/sessions/4af2dd6f-c955-45c0-9fd3-7cf0fd1d4e6b
Updated in commit |
Container Apps using HTTP-based ingress default to TCP health probes, which only check port connectivity rather than application health. This rule enforces HTTP health probes (
httpGet) for Liveness and Readiness checks when HTTP ingress is in use.Rule behavior
Applies when (similar to
Azure.AppService.WebProbe):properties.configuration.ingress.transportishttporhttp2, ORproperties.configuration.ingress.targetPortis80,8080, or443Checks that each container has both
LivenessandReadinessprobes configured withhttpGet. Startup probes are excluded.Fails if probes are absent (TCP default) or explicitly configured as
tcpSocket.Example (passing)
Changes
Azure.ContainerApp.Rule.yaml): AddedAzure.ContainerApp.HealthProbe(AZR-000537,ruleSet: 2026_06, pillar: Reliability) as a YAML rule using theAzure.ContainerApp.IsHttpIngressselector andcount: 1to assert at least one HTTP probe per containerAzure.ContainerApp.Rule.yaml): AddedAzure.ContainerApp.IsHttpIngressYAML selector matching on transporthttp/http2or target port80/8080/443Resources.ContainerApp.json): Addedcapp-E(pass —httpGetprobes, transporthttp),capp-F(fail —tcpSocketprobes, transporthttp), andcapp-G(pass —httpGetprobes, transporthttp2)Azure.ContainerApp.Tests.ps1): New test block for the rule; updated pass/fail counts for existing rules affected by the new resourcesAzure.ContainerApp.HealthProbe.md, updatedindex.mdandchangelog.mdOriginal prompt
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.