v1beta1

package
v1.8.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package v1beta1 contains API Schema definitions for the policy v1alpha1 API group +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=kyverno.io

Package v1beta1 contains API Schema definitions for the kyverno.io v1beta1 API group +kubebuilder:object:generate=true +groupName=kyverno.io

Index

Constants

View Source
const (
	// URMutatePolicyLabel adds the policy name to URs for mutate policies
	URMutatePolicyLabel            = "mutate.updaterequest.kyverno.io/policy-name"
	URMutateTriggerNameLabel       = "mutate.updaterequest.kyverno.io/trigger-name"
	URMutateTriggerNSLabel         = "mutate.updaterequest.kyverno.io/trigger-namespace"
	URMutatetriggerKindLabel       = "mutate.updaterequest.kyverno.io/trigger-kind"
	URMutatetriggerAPIVersionLabel = "mutate.updaterequest.kyverno.io/trigger-apiversion"

	// URGeneratePolicyLabel adds the policy name to URs for generate policies
	URGeneratePolicyLabel          = "generate.kyverno.io/policy-name"
	URGenerateResourceNameLabel    = "generate.kyverno.io/resource-name"
	URGenerateResourceNSLabel      = "generate.kyverno.io/resource-namespace"
	URGenerateResourceKindLabel    = "generate.kyverno.io/resource-kind"
	URGenerateRetryCountAnnotation = "generate.kyverno.io/retry-count"
)

Variables

View Source
var (
	// SchemeBuilder builds the scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds all types of this clientset into the given scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: kyverno.GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AdmissionRequestInfoObject

type AdmissionRequestInfoObject struct {
	// +optional
	AdmissionRequest *admissionv1.AdmissionRequest `json:"admissionRequest,omitempty" yaml:"admissionRequest,omitempty"`
	// +optional
	Operation admissionv1.Operation `json:"operation,omitempty" yaml:"operation,omitempty"`
}

AdmissionRequestInfoObject stores the admission request and operation details

func (*AdmissionRequestInfoObject) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionRequestInfoObject.

func (*AdmissionRequestInfoObject) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequestInfo

type RequestInfo struct {
	// Roles is a list of possible role send the request.
	// +nullable
	// +optional
	Roles []string `json:"roles" yaml:"roles"`

	// ClusterRoles is a list of possible clusterRoles send the request.
	// +nullable
	// +optional
	ClusterRoles []string `json:"clusterRoles" yaml:"clusterRoles"`

	// UserInfo is the userInfo carried in the admission request.
	// +optional
	AdmissionUserInfo authenticationv1.UserInfo `json:"userInfo" yaml:"userInfo"`
}

RequestInfo contains permission info carried in an admission request.

func (*RequestInfo) DeepCopy

func (in *RequestInfo) DeepCopy() *RequestInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestInfo.

func (*RequestInfo) DeepCopyInto

func (in *RequestInfo) DeepCopyInto(out *RequestInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequestType

type RequestType string
const (
	Mutate   RequestType = "mutate"
	Generate RequestType = "generate"
)

type UpdateRequest

type UpdateRequest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the information to identify the update request.
	Spec UpdateRequestSpec `json:"spec,omitempty"`

	// Status contains statistics related to update request.
	// +optional
	Status UpdateRequestStatus `json:"status,omitempty"`
}

UpdateRequest is a request to process mutate and generate rules in background.

func (*UpdateRequest) DeepCopy

func (in *UpdateRequest) DeepCopy() *UpdateRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateRequest.

func (*UpdateRequest) DeepCopyInto

func (in *UpdateRequest) DeepCopyInto(out *UpdateRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpdateRequest) DeepCopyObject

func (in *UpdateRequest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpdateRequestList

type UpdateRequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []UpdateRequest `json:"items"`
}

UpdateRequestList contains a list of UpdateRequest

func (*UpdateRequestList) DeepCopy

func (in *UpdateRequestList) DeepCopy() *UpdateRequestList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateRequestList.

func (*UpdateRequestList) DeepCopyInto

func (in *UpdateRequestList) DeepCopyInto(out *UpdateRequestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpdateRequestList) DeepCopyObject

func (in *UpdateRequestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpdateRequestSpec

type UpdateRequestSpec struct {
	// Type represents request type for background processing
	// +kubebuilder:validation:Enum=mutate;generate
	Type RequestType `json:"requestType,omitempty" yaml:"requestType,omitempty"`

	// Specifies the name of the policy.
	Policy string `json:"policy" yaml:"policy"`

	// ResourceSpec is the information to identify the update request.
	Resource kyvernov1.ResourceSpec `json:"resource" yaml:"resource"`

	// Context ...
	Context UpdateRequestSpecContext `json:"context" yaml:"context"`
}

UpdateRequestSpec stores the request specification.

func (*UpdateRequestSpec) DeepCopy

func (in *UpdateRequestSpec) DeepCopy() *UpdateRequestSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateRequestSpec.

func (*UpdateRequestSpec) DeepCopyInto

func (in *UpdateRequestSpec) DeepCopyInto(out *UpdateRequestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpdateRequestSpec) GetRequestType

func (s *UpdateRequestSpec) GetRequestType() RequestType

type UpdateRequestSpecContext

type UpdateRequestSpecContext struct {
	// +optional
	UserRequestInfo RequestInfo `json:"userInfo,omitempty" yaml:"userInfo,omitempty"`
	// +optional
	AdmissionRequestInfo AdmissionRequestInfoObject `json:"admissionRequestInfo,omitempty" yaml:"admissionRequestInfo,omitempty"`
}

UpdateRequestSpecContext stores the context to be shared.

func (*UpdateRequestSpecContext) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateRequestSpecContext.

func (*UpdateRequestSpecContext) DeepCopyInto

func (in *UpdateRequestSpecContext) DeepCopyInto(out *UpdateRequestSpecContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpdateRequestState

type UpdateRequestState string

UpdateRequestState defines the state of request.

const (
	// Pending - the Request is yet to be processed or resource has not been created.
	Pending UpdateRequestState = "Pending"

	// Failed - the Update Request Controller failed to process the rules.
	Failed UpdateRequestState = "Failed"

	// Completed - the Update Request Controller created resources defined in the policy.
	Completed UpdateRequestState = "Completed"

	// Skip - the Update Request Controller skips to generate the resource.
	Skip UpdateRequestState = "Skip"
)

type UpdateRequestStatus

type UpdateRequestStatus struct {
	// Handler represents the instance ID that handles the UR
	Handler string `json:"handler,omitempty" yaml:"handler,omitempty"`

	// State represents state of the update request.
	State UpdateRequestState `json:"state" yaml:"state"`

	// Specifies request status message.
	// +optional
	Message string `json:"message,omitempty" yaml:"message,omitempty"`

	// This will track the resources that are updated by the generate Policy.
	// Will be used during clean up resources.
	GeneratedResources []kyvernov1.ResourceSpec `json:"generatedResources,omitempty" yaml:"generatedResources,omitempty"`
}

UpdateRequestStatus defines the observed state of UpdateRequest

func (*UpdateRequestStatus) DeepCopy

func (in *UpdateRequestStatus) DeepCopy() *UpdateRequestStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateRequestStatus.

func (*UpdateRequestStatus) DeepCopyInto

func (in *UpdateRequestStatus) DeepCopyInto(out *UpdateRequestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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