Skip to content

Configure infrastructure exemptions

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.

  • 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)

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.

  1. 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: core
    repository: registry.defenseunicorns.com/public/core
    ref: x.x.x-upstream
    overrides:
    uds-exemptions:
    uds-exemptions:
    values:
    - path: exemptions.istioGatewayNodeport.enabled
    value: true

    This creates DisallowNodePortServices exemptions for the admin and tenant gateway services. To also include the passthrough gateway, override the gateways list:

    uds-bundle.yaml
    packages:
    - name: core
    repository: registry.defenseunicorns.com/public/core
    ref: x.x.x-upstream
    overrides:
    uds-exemptions:
    uds-exemptions:
    values:
    - path: exemptions.istioGatewayNodeport.enabled
    value: true
    - path: exemptions.istioGatewayNodeport.gateways
    value:
    - admin
    - tenant
    - passthrough
  2. Create and deploy your bundle

    Terminal window
    uds create --confirm && uds deploy uds-bundle-*.tar.zst --confirm

Confirm the exemptions were created:

Terminal window
# List all exemptions
uds zarf tools kubectl get exemptions -n uds-policy-exemptions

Verify that the target workload is running without admission denials:

Terminal window
# For NodePort exemptions, check gateway services
uds zarf tools kubectl get svc -n istio-admin-gateway
uds zarf tools kubectl get svc -n istio-tenant-gateway
# For custom exemptions, check pods/services are running
uds zarf tools kubectl get pods -n <namespace>

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:

Terminal window
uds zarf tools kubectl get exemptions -n uds-policy-exemptions | grep nodeport

Problem: 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.

These guides and concepts may be useful to explore next: