Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/policies.kyverno.io/v1alpha1/common.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type EvaluationMode = string

type EvaluationConfiguration struct {
Expand Down Expand Up @@ -33,4 +37,11 @@
// +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.

Check failure on line 42 in api/policies.kyverno.io/v1alpha1/common.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not properly formatted (gci)
// 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"`
}
5 changes: 5 additions & 0 deletions api/policies.kyverno.io/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down
Loading
Loading