v2alpha1

package
v1.11.0-rc.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

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

View Source
const GroupName = "kyverno.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v2alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
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

func RegisterDefaults(scheme *runtime.Scheme) error

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 ValidateContext(path *field.Path, context []kyvernov1.ContextEntry) (errs field.ErrorList)

func ValidateSchedule

func ValidateSchedule(path *field.Path, schedule string) (errs field.ErrorList)

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

func (p *CleanupPolicy) GetNextExecutionTime(time time.Time) (*time.Time, error)

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

func (*CleanupPolicy) Validate

func (p *CleanupPolicy) Validate(clusterResources sets.Set[string]) (errs field.ErrorList)

Validate implements programmatic validation

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

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

func (p *ClusterCleanupPolicy) GetNextExecutionTime(time time.Time) (*time.Time, error)

GetNextExecutionTime returns the next execution time of the policy

func (*ClusterCleanupPolicy) GetSpec

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

func (*ClusterCleanupPolicy) Validate

func (p *ClusterCleanupPolicy) Validate(clusterResources sets.Set[string]) (errs field.ErrorList)

Validate implements programmatic validation

type ClusterCleanupPolicyList

type ClusterCleanupPolicyList kyvernov2beta1.ClusterCleanupPolicyList

ClusterCleanupPolicyList is a list of ClusterCleanupPolicy instances.

func (*ClusterCleanupPolicyList) DeepCopy

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL