Azure / azure-workload-identity

Azure AD Workload Identity uses Kubernetes primitives to associate managed identities for Azure resources and identities in Azure Active Directory (AAD) with pods.
https://azure.github.io/azure-workload-identity
MIT License
297 stars 90 forks source link

Pods with azure.workload.identity/inject-proxy-sidecar annotation are blocked by Azure Policy due to container security #825

Closed dks0296586 closed 1 year ago

dks0296586 commented 1 year ago

Describe the bug After moving to workload-identity 1.0.0 deployments using the azure.workload.identity/inject-proxy-sidecar annotation fail to create pods due to required readonly root filesystem setting. This previously was not blocked by Azure Policy on version 0.15

Steps To Reproduce Create a deployment that sets the annotation azure.workload.identity/inject-proxy-sidecar

Expected behavior The deployment creates a replicaset with pods running the application container as well as the injected proxy sidecar container

Logs Warning FailedCreate 2m20s (x8 over 7m46s) replicaset-controller (combined from similar events): Error creating: admission webhook "validation.gatekeeper.sh" denied the request: [azurepolicy-k8sazurev3readonlyrootfilesyst-01317df5d97e241e6132] Readonly root filesystem is required for container. pod:'pod', container:'azwi-proxy' [azurepolicy-k8sazurev3readonlyrootfilesyst-01317df5d97e241e6132] Readonly root filesystem is required for container. pod:'pod', container:'azwi-proxy-init'

Environment

Additional context

aramase commented 1 year ago
aramase commented 1 year ago

Closed with https://github.com/Azure/azure-workload-identity/pull/829