diff --git a/api/policies.kyverno.io/v1alpha1/common.go b/api/policies.kyverno.io/v1alpha1/common.go index 7d7bfa5..2fd3887 100644 --- a/api/policies.kyverno.io/v1alpha1/common.go +++ b/api/policies.kyverno.io/v1alpha1/common.go @@ -1,5 +1,9 @@ package v1alpha1 +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + type EvaluationMode = string type EvaluationConfiguration struct { @@ -33,4 +37,11 @@ type BackgroundConfiguration struct { // +optional // +kubebuilder:default=true Enabled *bool `json:"enabled,omitempty"` + + // Interval defines how often background scanning is performed for this specific policy. + // Overrides the global background scan interval set at the controller level. + // The value must be a valid duration string (e.g., "15m", "1h", "30s"). + // Optional. If not set, the global background scan interval is used. + // +optional + Interval *metav1.Duration `json:"interval,omitempty"` } diff --git a/api/policies.kyverno.io/v1alpha1/zz_generated.deepcopy.go b/api/policies.kyverno.io/v1alpha1/zz_generated.deepcopy.go index aca9cc5..0f6d69a 100644 --- a/api/policies.kyverno.io/v1alpha1/zz_generated.deepcopy.go +++ b/api/policies.kyverno.io/v1alpha1/zz_generated.deepcopy.go @@ -110,6 +110,11 @@ func (in *BackgroundConfiguration) DeepCopyInto(out *BackgroundConfiguration) { *out = new(bool) **out = **in } + if in.Interval != nil { + in, out := &in.Interval, &out.Interval + *out = new(v1.Duration) + **out = **in + } return } diff --git a/charts/kyverno-api/templates/crds/policies.kyverno.io_imagevalidatingpolicies.yaml b/charts/kyverno-api/templates/crds/policies.kyverno.io_imagevalidatingpolicies.yaml index 819b655..871ab4f 100644 --- a/charts/kyverno-api/templates/crds/policies.kyverno.io_imagevalidatingpolicies.yaml +++ b/charts/kyverno-api/templates/crds/policies.kyverno.io_imagevalidatingpolicies.yaml @@ -503,6 +503,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1615,6 +1622,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2858,6 +2872,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3970,6 +3991,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -5212,6 +5240,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -6324,6 +6359,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/charts/kyverno-api/templates/crds/policies.kyverno.io_mutatingpolicies.yaml b/charts/kyverno-api/templates/crds/policies.kyverno.io_mutatingpolicies.yaml index b0f06e3..3dfaa6f 100644 --- a/charts/kyverno-api/templates/crds/policies.kyverno.io_mutatingpolicies.yaml +++ b/charts/kyverno-api/templates/crds/policies.kyverno.io_mutatingpolicies.yaml @@ -101,6 +101,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1119,6 +1126,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2300,6 +2314,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3318,6 +3339,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -4498,6 +4526,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -5516,6 +5551,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml b/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml index 6de36be..c480046 100644 --- a/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml +++ b/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml @@ -503,6 +503,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1615,6 +1622,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2857,6 +2871,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3969,6 +3990,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml b/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml index 33a078f..17a20bd 100644 --- a/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml +++ b/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml @@ -101,6 +101,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1119,6 +1126,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2299,6 +2313,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3317,6 +3338,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml b/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml index f391b11..2903508 100644 --- a/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml +++ b/charts/kyverno-api/templates/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml @@ -153,6 +153,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -860,6 +867,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1715,6 +1729,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2422,6 +2443,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/charts/kyverno-api/templates/crds/policies.kyverno.io_validatingpolicies.yaml b/charts/kyverno-api/templates/crds/policies.kyverno.io_validatingpolicies.yaml index 0660142..a15261e 100644 --- a/charts/kyverno-api/templates/crds/policies.kyverno.io_validatingpolicies.yaml +++ b/charts/kyverno-api/templates/crds/policies.kyverno.io_validatingpolicies.yaml @@ -153,6 +153,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -860,6 +867,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1716,6 +1730,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2423,6 +2444,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3278,6 +3306,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3985,6 +4020,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds.yaml b/config/crds.yaml index 4ece9a0..d5e3595 100644 --- a/config/crds.yaml +++ b/config/crds.yaml @@ -4080,6 +4080,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -5192,6 +5199,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -6435,6 +6449,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -7547,6 +7568,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -8789,6 +8817,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -9901,6 +9936,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -10761,6 +10803,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -11779,6 +11828,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -12960,6 +13016,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -13978,6 +14041,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -15158,6 +15228,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -16176,6 +16253,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -20180,6 +20264,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -21292,6 +21383,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -22534,6 +22632,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -23646,6 +23751,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -24506,6 +24618,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -25524,6 +25643,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -26704,6 +26830,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -27722,6 +27855,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -28974,6 +29114,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -29681,6 +29828,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -30536,6 +30690,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -31243,6 +31404,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -32537,6 +32705,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -33244,6 +33419,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -34100,6 +34282,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -34807,6 +34996,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -35662,6 +35858,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -36369,6 +36572,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds/policies.kyverno.io_imagevalidatingpolicies.yaml b/config/crds/policies.kyverno.io_imagevalidatingpolicies.yaml index d7d7de3..96352e6 100644 --- a/config/crds/policies.kyverno.io_imagevalidatingpolicies.yaml +++ b/config/crds/policies.kyverno.io_imagevalidatingpolicies.yaml @@ -501,6 +501,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1613,6 +1620,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2856,6 +2870,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3968,6 +3989,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -5210,6 +5238,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -6322,6 +6357,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds/policies.kyverno.io_mutatingpolicies.yaml b/config/crds/policies.kyverno.io_mutatingpolicies.yaml index e9d307b..425086a 100644 --- a/config/crds/policies.kyverno.io_mutatingpolicies.yaml +++ b/config/crds/policies.kyverno.io_mutatingpolicies.yaml @@ -99,6 +99,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1117,6 +1124,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2298,6 +2312,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3316,6 +3337,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -4496,6 +4524,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -5514,6 +5549,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml b/config/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml index a182ee4..87c26ae 100644 --- a/config/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml +++ b/config/crds/policies.kyverno.io_namespacedimagevalidatingpolicies.yaml @@ -501,6 +501,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1613,6 +1620,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2855,6 +2869,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3967,6 +3988,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml b/config/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml index a2fb6b5..8be60dd 100644 --- a/config/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml +++ b/config/crds/policies.kyverno.io_namespacedmutatingpolicies.yaml @@ -99,6 +99,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1117,6 +1124,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2297,6 +2311,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3315,6 +3336,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml b/config/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml index f5fe032..4f850a3 100644 --- a/config/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml +++ b/config/crds/policies.kyverno.io_namespacedvalidatingpolicies.yaml @@ -151,6 +151,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -858,6 +865,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1713,6 +1727,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2420,6 +2441,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/config/crds/policies.kyverno.io_validatingpolicies.yaml b/config/crds/policies.kyverno.io_validatingpolicies.yaml index 42a7a13..d854748 100644 --- a/config/crds/policies.kyverno.io_validatingpolicies.yaml +++ b/config/crds/policies.kyverno.io_validatingpolicies.yaml @@ -151,6 +151,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -858,6 +865,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -1714,6 +1728,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -2421,6 +2442,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3276,6 +3304,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- @@ -3983,6 +4018,13 @@ spec: Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name). type: boolean + interval: + description: |- + Interval defines how often background scanning is performed for this specific policy. + Overrides the global background scan interval set at the controller level. + The value must be a valid duration string (e.g., "15m", "1h", "30s"). + Optional. If not set, the global background scan interval is used. + type: string type: object mode: description: |- diff --git a/docs/user/crd/index.html b/docs/user/crd/index.html index 25de891..3d549d9 100644 --- a/docs/user/crd/index.html +++ b/docs/user/crd/index.html @@ -4113,6 +4113,23 @@

BackgroundConfigur uses variables that are only available in the admission review request (e.g. user name).

+ + +interval
+ + +Kubernetes meta/v1.Duration + + + + +(Optional) +

Interval defines how often background scanning is performed for this specific policy. +Overrides the global background scan interval set at the controller level. +The value must be a valid duration string (e.g., “15m”, “1h”, “30s”). +Optional. If not set, the global background scan interval is used.

+ +
diff --git a/docs/user/crd/kyverno_cel_policies.v1alpha1.html b/docs/user/crd/kyverno_cel_policies.v1alpha1.html index 44f6b40..95a3047 100644 --- a/docs/user/crd/kyverno_cel_policies.v1alpha1.html +++ b/docs/user/crd/kyverno_cel_policies.v1alpha1.html @@ -3721,6 +3721,38 @@

BackgroundConfigur + + + + + + + + interval + +
+ + + + + + meta/v1.Duration + + + + + + + +

Interval defines how often background scanning is performed for this specific policy. +Overrides the global background scan interval set at the controller level. +The value must be a valid duration string (e.g., "15m", "1h", "30s"). +Optional. If not set, the global background scan interval is used.

+ + + + +