1# -- Policy kind (`ClusterPolicy`, `Policy`)
2# Set to `Policy` if you need namespaced policies and not cluster policies.
3# Only used when `policyType` is `ClusterPolicy` (the legacy kyverno.io types);
4# with the default `policyType: ValidatingPolicy` cluster-wide CEL policies are installed.
5policyKind: ClusterPolicy
7# -- Policy engine type (`ClusterPolicy`, `ValidatingPolicy`)
8# `ValidatingPolicy` installs CEL-based policies (policies.kyverno.io, requires Kyverno 1.17+).
9# Set to `ClusterPolicy` to keep installing the legacy kyverno.io policy types,
10# which are deprecated and will be removed in a future release
11# (see https://kyverno.io/docs/guides/migration-to-cel/).
12policyType: ValidatingPolicy
14# -- Pod Security Standard profile (`baseline`, `restricted`, `privileged`, `custom`).
15# For more info https://kyverno.io/policies/pod-security.
16podSecurityStandard: baseline
18# -- Pod Security Standard severity (`low`, `medium`, `high`).
19podSecuritySeverity: medium
21# -- Define podSecuritySeverity overrides for specific policies.
22# Override the global `podSecuritySeverity` with an individual severity for individual policies.
23# An empty string per-policy entry suppresses the annotation entirely.
24podSecuritySeverityByPolicy: {}
25# disallow-host-path: high
26# disallow-privileged-containers: high
28# -- Policies to include when `podSecurityStandard` is `custom`.
29podSecurityPolicies: []
31# -- Enable the Kubernetes Pod Security Admission relaxation for user namespace pods
32# for ValidatingPolicy templates only.
33# When `true`, the `disallow-proc-mount` (Baseline), `require-run-as-nonroot` and
34# `require-run-as-non-root-user` (Restricted) ValidatingPolicies skip Pods that explicitly
35# set `spec.hostUsers` to `false`. A Pod that omits `hostUsers` or sets it to `true` is
36# always checked. The Restricted `disallow-proc-mount-strict` ValidatingPolicy never
37# relaxes, and neither does `disallow-proc-mount` when the Restricted profile is installed.
38# This setting has no effect on legacy `ClusterPolicy` templates.
39podSecurityUserNamespaces: false
41# -- Additional policies to include from `other`.
42includeOtherPolicies: []
43# - require-non-root-groups
45# -- Additional policies to include from `restricted`.
46includeRestrictedPolicies: []
47# - require-run-as-non-root-user
49# -- Additional custom policies to include.
51# - apiVersion: kyverno.io/v1
56# -- API server behavior if the webhook fails to respond ('Ignore', 'Fail')
57# For more info: https://kyverno.io/docs/policy-types/cluster-policy/policy-settings/
60# -- Validation failure action (`Audit`, `Enforce`).
61# For more info https://kyverno.io/docs/policy-types/cluster-policy/validate.
62validationFailureAction: Audit
64# -- Define validationFailureActionByPolicy for specific policies.
65# Override the defined `validationFailureAction` with a individual validationFailureAction for individual Policies.
66validationFailureActionByPolicy: {}
67# disallow-capabilities-strict: Enforce
68# disallow-host-path: Enforce
69# disallow-host-ports: Enforce
71# -- Define validationFailureActionOverrides for specific policies.
72# The overrides for `all` will apply to all policies.
73validationFailureActionOverrides:
84# -- Default audit annotations applied to all ValidatingPolicy policies (policyType: ValidatingPolicy only).
85# Map of annotation key to CEL valueExpression. Audit annotations are recorded in the API server audit log.
86# For more info https://kyverno.io/docs/policy-types/validating-policy/#using-auditannotations-to-add-custom-data
88 # policy-evaluated-by: "'kyverno-policies-helm'"
90# -- Define audit annotations for specific ValidatingPolicy policies (policyType: ValidatingPolicy only).
91# Per-policy entries override defaults when they share the same key.
92auditAnnotationsByPolicy: {}
94 # violation-details: >-
95 # has(object.spec.volumes) ? 'hostPath volumes found: ' + object.spec.volumes.filter(v, has(v.hostPath)).map(v, v.name).join(', ') : 'no volumes'
97# -- Validate already existing resources.
98# For more info https://kyverno.io/docs/policy-types/.
99validationAllowExistingViolations: true
101# -- Exclude resources from individual policies (policyType: ClusterPolicy only).
102# Policies with multiple rules can have individual rules excluded by using the name of the rule as the key in the `policyExclude` map.
103# NOTE: This setting only applies when policyType is set to ClusterPolicy. For ValidatingPolicy, use vpolExclude/vpolExcludeByPolicy instead.
105 # # Exclude resources from individual policies
106 # disallow-host-path:
113 # # Policies with multiple rules can have individual rules excluded
114 # adding-capabilities-strict:
122# -- Default excludes applied to ALL ValidatingPolicy policies (policyType: ValidatingPolicy only).
123# NOTE: This setting only applies when policyType is set to ValidatingPolicy. For ClusterPolicy, use policyExclude instead.
124# Supports the following optional keys:
125# excludeResourceRules: list of Kubernetes NamedRuleWithOperations (native VAP excludes)
126# excludeNamespaces: list of namespace names to exclude (generates CEL matchCondition)
127# excludeSubjects: list of subjects to exclude (generates CEL matchCondition)
128# matchConditions: list of CEL matchConditions for advanced filtering (passthrough of custom condition)
129# Per-policy overrides via vpolExcludeByPolicy replace these defaults entirely for that policy.
135 # name: system:masters
137# -- Per-policy excludes for individual ValidatingPolicy policies (policyType: ValidatingPolicy only).
138# When set for a policy, it completely replaces the global vpolExclude defaults for that policy.
139# NOTE: This setting only applies when policyType is set to ValidatingPolicy. For ClusterPolicy, use policyExclude instead.
140# Each policy name maps to an object with the same keys as vpolExclude.
141vpolExcludeByPolicy: {}
142 # disallow-host-path:
143 # excludeResourceRules:
153 # # optional - exact resource names to exclude
155 # - specific-pod-name
161 # name: system:masters
163 # name: admin@example.com
164 # - kind: ServiceAccount
165 # namespace: kube-system
168 # - name: exclude-custom
169 # expression: "!object.metadata.name.startsWith('temp-')"
171# -- Add preconditions to individual policies.
172# Policies with multiple rules can have individual rules excluded by using the name of the rule as the key in the `policyPreconditions` map.
173policyPreconditions: {}
174 # # Exclude resources from individual policies
175 # require-run-as-non-root-user:
177 # - key: "{{ request.object.metadata.name }}"
178 # operator: NotEquals
179 # value: "dcgm-exporter*"
180 # # Policies with multiple rules can have individual rules excluded
183 # - key: "{{ request.object.metadata.name }}"
184 # operator: NotEquals
185 # value: "dcgm-exporter*"
186 # adding-capabilities-strict:
188 # - key: "{{ request.object.metadata.name }}"
189 # operator: NotEquals
190 # value: "dcgm-exporter*"
192# -- Customize the target Pod controllers for the auto-generated rules. (Eg. `none`, `Deployment`, `DaemonSet,Deployment,StatefulSet`)
193# For more info https://kyverno.io/docs/policy-types/cluster-policy/autogen/.
194autogenControllers: ""
199# -- Additional Annotations.
202# -- Define custom annotations for specific policies.
203# Per-policy entries override defaults when they share the same key.
204customAnnotationsByPolicy: {}
206# my-custom-annotation: "some-value"
208# -- Additional labels.
211# -- Policies background mode
214# -- (bool) SkipBackgroundRequests bypasses admission requests that are sent by the background controller
215skipBackgroundRequests: ~
218# The default of "autodetect" will try to determine the currently installed version from the deployment
219kyvernoVersion: autodetect
221# -- Kubernetes version override
222# Override default value of kubeVersion set by release team taken from Chart.yaml with custom value. Ideally range of versions no more than two prior (ex., 1.28-1.31), must be enclosed in quotes.