Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

kubewarden/pod-ndots-policy

Repository files navigation

Important

Notice: Starting from Kubewarden release 1.32.0, all code from this repository has been merged into github.com/kubewarden/policies, which is now a monorepo containing policies. Please refer to that repository for future updates and development. This repository is now archived. Development continues in the new location.

Kubewarden Policy Repository Stable

Kubewarden policy that enforces the DNS lookup configuration of a Pod to have a specific ndots value.

This is done by mutating the Pod's .spec.dnsConfig.options field to have the desired ndots value.

Configuration

The number of ndots to enforce can be configured using the ndots field.

ndots: 2

When no configuration is provided, the default value is 1.

Examples

Assuming the no configuration is provided, the policy will enforce the ndots value to be 1.

This will change the following Pod:

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
    - name: nginx
      image: nginx

To the following Pod:

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  dnsConfig:
    options:
      - name: ndots
        value: "1"
  containers:
    - name: nginx
      image: nginx

About

Policy that enforces the usage of ndots in the pod's DNS configuration

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors