Skip to content

Commit 52bf62d

Browse files
authored
Merge pull request #184344 from nehakulkarni123/patch-8
Updated to reflect fail close model
2 parents 9280317 + 097165d commit 52bf62d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

articles/governance/policy/troubleshoot/general.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,22 @@ $def = Get-AzPolicyDefinition -id '/providers/Microsoft.Authorization/policyDefi
437437
New-AzPolicyDefinition -name (new-guid).guid -DisplayName "$($def.DisplayName) (Copy)" -Description $def.Description -Metadata ($def.Metadata | convertto-json) -Parameter ($def.Parameters | convertto-json) -Policy ($def.PolicyRule | convertto-json -depth 15)
438438
```
439439

440+
### Scenario: Kubernetes resource gets created during connectivity failure despite deny policy being assigned
441+
442+
#### Issue
443+
444+
In the event of a Kubernetes cluster connectivity failure, evaluation for newly created or updated resources may be bypassed due to Gatekeeper's fail-open behavior.
445+
446+
#### Cause
447+
448+
The GK fail-open model is by design and based on community feedback. Gatekeeper documentation expands on these reasons here: https://open-policy-agent.github.io/gatekeeper/website/docs/failing-closed#considerations.
449+
450+
#### Resolution
451+
452+
In the above event, the error case can be monitored from the [admission webhook metrics](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhook-metrics) provided by the kube-apiserver. And even if evaluation is bypassed at creation time and an object is created, it will still be reported on Azure Policy compliance as non-compliant as a flag to customers.
453+
454+
Regardless of the above, in such a scenario, Azure policy will still retain the last known policy on the cluster and keep the guardrails in place.
455+
440456
## Next steps
441457

442458
If your problem isn't listed in this article or you can't resolve it, get support by visiting one of

0 commit comments

Comments
 (0)