All Policies
Add ndots
The ndots value controls where DNS lookups are first performed in a cluster and needs to be set to a lower value than the default of 5 in some cases. This policy mutates all Pods to add the ndots option with a value of 1.
Policy Definition
/other/add-ndots/add-ndots.yaml
1apiVersion: kyverno.io/v1
2kind: ClusterPolicy
3metadata:
4 name: add-ndots
5 annotations:
6 policies.kyverno.io/title: Add ndots
7 policies.kyverno.io/category: Sample
8 policies.kyverno.io/subject: Pod
9 policies.kyverno.io/minversion: 1.6.0
10 policies.kyverno.io/description: >-
11 The ndots value controls where DNS lookups are first performed in a cluster
12 and needs to be set to a lower value than the default of 5 in some cases.
13 This policy mutates all Pods to add the ndots option with a value of 1.
14spec:
15 rules:
16 - name: add-ndots
17 match:
18 any:
19 - resources:
20 kinds:
21 - Pod
22 mutate:
23 patchStrategicMerge:
24 spec:
25 dnsConfig:
26 options:
27 - name: ndots
28 value: "1"