Configure infrastructure exemptions
What you’ll accomplish
Section titled “What you’ll accomplish”You’ll configure policy exemptions for infrastructure workloads that legitimately require elevated privileges, such as Istio gateway NodePort services or third-party storage and networking components.
Prerequisites
Section titled “Prerequisites”- UDS CLI installed
- Access to a Kubernetes cluster with UDS Core deployed (or ready to deploy Core to)
- Familiarity with UDS Bundles
- The exemption policy names for your workload (see Policy Engine reference)
Before you begin
Section titled “Before you begin”Infrastructure exemptions are typically applied during or before Core installation to resolve infrastructure-specific issues that would otherwise block deployment. Application-level exemptions should be deployed as manifests alongside their applications instead — see Create UDS policy exemptions.
Some infrastructure workloads require privileges that UDS Core policies normally block. For example:
- Istio gateways may use NodePort services when an external load balancer handles traffic routing
- Storage drivers (e.g., OpenEBS) require privileged containers and host path access
- CNI plugins need host networking and elevated privileges
UDS Core provides a built-in exemption for Istio gateway NodePorts (a common configuration change when external load balancers handle traffic routing) and supports custom exemptions for everything else. All exemptions are deployed via bundle overrides.
-
Choose the exemption type
UDS Core includes a ready-to-use exemption for Istio gateway NodePort services. Enable it in your bundle:
uds-bundle.yaml packages:- name: corerepository: registry.defenseunicorns.com/public/coreref: x.x.x-upstreamoverrides:uds-exemptions:uds-exemptions:values:- path: exemptions.istioGatewayNodeport.enabledvalue: trueThis creates
DisallowNodePortServicesexemptions for theadminandtenantgateway services. To also include the passthrough gateway, override the gateways list:uds-bundle.yaml packages:- name: corerepository: registry.defenseunicorns.com/public/coreref: x.x.x-upstreamoverrides:uds-exemptions:uds-exemptions:values:- path: exemptions.istioGatewayNodeport.enabledvalue: true- path: exemptions.istioGatewayNodeport.gatewaysvalue:- admin- tenant- passthroughFor third-party infrastructure workloads, use the
exemptions.custompath. This example exempts a storage driver that needs privileged access and host paths:uds-bundle.yaml packages:- name: corerepository: registry.defenseunicorns.com/public/coreref: x.x.x-upstreamoverrides:uds-exemptions:uds-exemptions:values:- path: exemptions.customvalue:- name: openebs-exemptionsexemptions:- policies:- DisallowPrivileged- RestrictVolumeTypes- RestrictHostPathWritematcher:namespace: openebsname: "^openebs.*"title: "OpenEBS storage driver"description: "Requires privileged access and hostPath volumes for local PV provisioning" -
Create and deploy your bundle
Terminal window uds create --confirm && uds deploy uds-bundle-*.tar.zst --confirm
Verification
Section titled “Verification”Confirm the exemptions were created:
# List all exemptionsuds zarf tools kubectl get exemptions -n uds-policy-exemptionsVerify that the target workload is running without admission denials:
# For NodePort exemptions, check gateway servicesuds zarf tools kubectl get svc -n istio-admin-gatewayuds zarf tools kubectl get svc -n istio-tenant-gateway
# For custom exemptions, check pods/services are runninguds zarf tools kubectl get pods -n <namespace>Troubleshooting
Section titled “Troubleshooting”Problem: NodePort exemption not created
Section titled “Problem: NodePort exemption not created”Symptom: Gateway services are still blocked after enabling the NodePort exemption.
Solution: Verify the exemptions.istioGatewayNodeport.enabled value is set to true in your bundle and that you redeployed Core after the change. Check that the Exemption CR exists:
uds zarf tools kubectl get exemptions -n uds-policy-exemptions | grep nodeportProblem: Custom exemption not taking effect
Section titled “Problem: Custom exemption not taking effect”Symptom: The infrastructure workload is still blocked despite the custom exemption.
Solution: Verify the matcher fields match your workload exactly. The namespace must match the workload’s namespace and the name regex must match the pod or service name. If the exemption CR exists but pods still aren’t being exempted, see the Exemptions & Packages Not Updating runbook for detailed diagnostics.
Related Documentation
Section titled “Related Documentation”- Policy Engine - full reference of all enforced policies and exemption names
- Exemption CR specification - full CR schema and field reference
Next steps
Section titled “Next steps”These guides and concepts may be useful to explore next: