Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=kyverno.io
Copyright 2022 The Kubernetes authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func ValidateContext(path *field.Path, context []kyvernov1.ContextEntry) (errs field.ErrorList)
- func ValidateSchedule(path *field.Path, schedule string) (errs field.ErrorList)
- func ValidateVariables(polex *PolicyException) error
- type CleanupPolicy
- func (in *CleanupPolicy) DeepCopy() *CleanupPolicy
- func (in *CleanupPolicy) DeepCopyInto(out *CleanupPolicy)
- func (in *CleanupPolicy) DeepCopyObject() runtime.Object
- func (p *CleanupPolicy) GetAPIVersion() string
- func (p *CleanupPolicy) GetExecutionTime() (*time.Time, error)
- func (p *CleanupPolicy) GetKind() string
- func (p *CleanupPolicy) GetNextExecutionTime(time time.Time) (*time.Time, error)
- func (p *CleanupPolicy) GetSpec() *CleanupPolicySpec
- func (p *CleanupPolicy) GetStatus() *CleanupPolicyStatus
- func (p *CleanupPolicy) IsNamespaced() bool
- func (p *CleanupPolicy) Validate(clusterResources sets.Set[string]) (errs field.ErrorList)
- type CleanupPolicyInterface
- type CleanupPolicyList
- type CleanupPolicySpec
- type CleanupPolicyStatus
- type ClusterCleanupPolicy
- func (in *ClusterCleanupPolicy) DeepCopy() *ClusterCleanupPolicy
- func (in *ClusterCleanupPolicy) DeepCopyInto(out *ClusterCleanupPolicy)
- func (in *ClusterCleanupPolicy) DeepCopyObject() runtime.Object
- func (p *ClusterCleanupPolicy) GetAPIVersion() string
- func (p *ClusterCleanupPolicy) GetExecutionTime() (*time.Time, error)
- func (p *ClusterCleanupPolicy) GetKind() string
- func (p *ClusterCleanupPolicy) GetNextExecutionTime(time time.Time) (*time.Time, error)
- func (p *ClusterCleanupPolicy) GetSpec() *CleanupPolicySpec
- func (p *ClusterCleanupPolicy) GetStatus() *CleanupPolicyStatus
- func (p *ClusterCleanupPolicy) IsNamespaced() bool
- func (p *ClusterCleanupPolicy) Validate(clusterResources sets.Set[string]) (errs field.ErrorList)
- type ClusterCleanupPolicyList
- type Exception
- type PolicyException
- func (p *PolicyException) Contains(policy string, rule string) bool
- func (in *PolicyException) DeepCopy() *PolicyException
- func (in *PolicyException) DeepCopyInto(out *PolicyException)
- func (in *PolicyException) DeepCopyObject() runtime.Object
- func (p *PolicyException) Validate() (errs field.ErrorList)
- type PolicyExceptionList
Constants ¶
const GroupName = "kyverno.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v2alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func RegisterDefaults ¶ added in v1.10.5
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
func ValidateContext ¶ added in v1.10.5
func ValidateSchedule ¶
ValidateSchedule validates whether the schedule specified is in proper cron format or not.
func ValidateVariables ¶ added in v1.10.0
func ValidateVariables(polex *PolicyException) error
Types ¶
type CleanupPolicy ¶
type CleanupPolicy kyvernov2beta1.CleanupPolicy
CleanupPolicy defines a rule for resource cleanup.
func (*CleanupPolicy) DeepCopy ¶
func (in *CleanupPolicy) DeepCopy() *CleanupPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CleanupPolicy.
func (*CleanupPolicy) DeepCopyInto ¶
func (in *CleanupPolicy) DeepCopyInto(out *CleanupPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CleanupPolicy) DeepCopyObject ¶
func (in *CleanupPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CleanupPolicy) GetAPIVersion ¶
func (p *CleanupPolicy) GetAPIVersion() string
GetAPIVersion returns the resource kind
func (*CleanupPolicy) GetExecutionTime ¶ added in v1.10.5
func (p *CleanupPolicy) GetExecutionTime() (*time.Time, error)
GetExecutionTime returns the execution time of the policy
func (*CleanupPolicy) GetKind ¶
func (p *CleanupPolicy) GetKind() string
GetKind returns the resource kind
func (*CleanupPolicy) GetNextExecutionTime ¶ added in v1.10.5
GetNextExecutionTime returns the next execution time of the policy
func (*CleanupPolicy) GetSpec ¶
func (p *CleanupPolicy) GetSpec() *CleanupPolicySpec
GetSpec returns the policy spec
func (*CleanupPolicy) GetStatus ¶
func (p *CleanupPolicy) GetStatus() *CleanupPolicyStatus
GetStatus returns the policy status
func (*CleanupPolicy) IsNamespaced ¶ added in v1.10.5
func (p *CleanupPolicy) IsNamespaced() bool
IsNamespaced indicates if the policy is namespace scoped
type CleanupPolicyInterface ¶
type CleanupPolicyInterface interface { metav1.Object IsNamespaced() bool GetSpec() *CleanupPolicySpec GetStatus() *CleanupPolicyStatus GetExecutionTime() (*time.Time, error) GetNextExecutionTime(time.Time) (*time.Time, error) Validate(sets.Set[string]) field.ErrorList GetKind() string GetAPIVersion() string }
CleanupPolicyInterface abstracts the concrete policy type (CleanupPolicy vs ClusterCleanupPolicy) +kubebuilder:object:generate=false
type CleanupPolicyList ¶
type CleanupPolicyList kyvernov2beta1.CleanupPolicyList
CleanupPolicyList is a list of ClusterPolicy instances.
func (*CleanupPolicyList) DeepCopy ¶
func (in *CleanupPolicyList) DeepCopy() *CleanupPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CleanupPolicyList.
func (*CleanupPolicyList) DeepCopyInto ¶
func (in *CleanupPolicyList) DeepCopyInto(out *CleanupPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CleanupPolicyList) DeepCopyObject ¶
func (in *CleanupPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CleanupPolicySpec ¶
type CleanupPolicySpec = kyvernov2beta1.CleanupPolicySpec
CleanupPolicySpec stores specifications for selecting resources that the user needs to delete and schedule when the matching resources needs deleted.
type CleanupPolicyStatus ¶
type CleanupPolicyStatus = kyvernov2beta1.CleanupPolicyStatus
CleanupPolicyStatus stores the status of the policy.
type ClusterCleanupPolicy ¶
type ClusterCleanupPolicy kyvernov2beta1.ClusterCleanupPolicy
ClusterCleanupPolicy defines rule for resource cleanup.
func (*ClusterCleanupPolicy) DeepCopy ¶
func (in *ClusterCleanupPolicy) DeepCopy() *ClusterCleanupPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCleanupPolicy.
func (*ClusterCleanupPolicy) DeepCopyInto ¶
func (in *ClusterCleanupPolicy) DeepCopyInto(out *ClusterCleanupPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterCleanupPolicy) DeepCopyObject ¶
func (in *ClusterCleanupPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterCleanupPolicy) GetAPIVersion ¶
func (p *ClusterCleanupPolicy) GetAPIVersion() string
GetAPIVersion returns the resource kind
func (*ClusterCleanupPolicy) GetExecutionTime ¶ added in v1.10.5
func (p *ClusterCleanupPolicy) GetExecutionTime() (*time.Time, error)
GetExecutionTime returns the execution time of the policy
func (*ClusterCleanupPolicy) GetKind ¶
func (p *ClusterCleanupPolicy) GetKind() string
GetKind returns the resource kind
func (*ClusterCleanupPolicy) GetNextExecutionTime ¶ added in v1.10.5
GetNextExecutionTime returns the next execution time of the policy
func (*ClusterCleanupPolicy) GetSpec ¶
func (p *ClusterCleanupPolicy) GetSpec() *CleanupPolicySpec
GetSpec returns the policy spec
func (*ClusterCleanupPolicy) GetStatus ¶
func (p *ClusterCleanupPolicy) GetStatus() *CleanupPolicyStatus
GetStatus returns the policy status
func (*ClusterCleanupPolicy) IsNamespaced ¶ added in v1.10.5
func (p *ClusterCleanupPolicy) IsNamespaced() bool
IsNamespaced indicates if the policy is namespace scoped
type ClusterCleanupPolicyList ¶
type ClusterCleanupPolicyList kyvernov2beta1.ClusterCleanupPolicyList
ClusterCleanupPolicyList is a list of ClusterCleanupPolicy instances.
func (*ClusterCleanupPolicyList) DeepCopy ¶
func (in *ClusterCleanupPolicyList) DeepCopy() *ClusterCleanupPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCleanupPolicyList.
func (*ClusterCleanupPolicyList) DeepCopyInto ¶
func (in *ClusterCleanupPolicyList) DeepCopyInto(out *ClusterCleanupPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterCleanupPolicyList) DeepCopyObject ¶
func (in *ClusterCleanupPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Exception ¶
type Exception = kyvernov2beta1.Exception
Exception stores infos about a policy and rules
type PolicyException ¶
type PolicyException kyvernov2beta1.PolicyException
PolicyException declares resources to be excluded from specified policies.
func (*PolicyException) Contains ¶
func (p *PolicyException) Contains(policy string, rule string) bool
Contains returns true if it contains an exception for the given policy/rule pair
func (*PolicyException) DeepCopy ¶
func (in *PolicyException) DeepCopy() *PolicyException
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyException.
func (*PolicyException) DeepCopyInto ¶
func (in *PolicyException) DeepCopyInto(out *PolicyException)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyException) DeepCopyObject ¶
func (in *PolicyException) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PolicyException) Validate ¶
func (p *PolicyException) Validate() (errs field.ErrorList)
Validate implements programmatic validation
type PolicyExceptionList ¶
type PolicyExceptionList kyvernov2beta1.PolicyExceptionList
PolicyExceptionList is a list of Policy Exceptions
func (*PolicyExceptionList) DeepCopy ¶
func (in *PolicyExceptionList) DeepCopy() *PolicyExceptionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyExceptionList.
func (*PolicyExceptionList) DeepCopyInto ¶
func (in *PolicyExceptionList) DeepCopyInto(out *PolicyExceptionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyExceptionList) DeepCopyObject ¶
func (in *PolicyExceptionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.