Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the policy v1beta1 API group +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=kyverno.io
Index ¶
- Constants
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- type AdmissionRequestInfoObject
- type RequestInfo
- type RequestType
- type UpdateRequest
- type UpdateRequestList
- type UpdateRequestSpec
- func (in *UpdateRequestSpec) DeepCopy() *UpdateRequestSpec
- func (in *UpdateRequestSpec) DeepCopyInto(out *UpdateRequestSpec)
- func (s *UpdateRequestSpec) GetPolicyKey() string
- func (s *UpdateRequestSpec) GetRequestType() RequestType
- func (s *UpdateRequestSpec) GetResource() kyvernov1.ResourceSpec
- func (s *UpdateRequestSpec) GetRuleName() string
- func (s *UpdateRequestSpec) GetSynchronize() bool
- type UpdateRequestSpecContext
- type UpdateRequestState
- type UpdateRequestStatus
Constants ¶
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" )
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: "v1beta1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
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
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 ¶
func (in *AdmissionRequestInfoObject) DeepCopy() *AdmissionRequestInfoObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionRequestInfoObject.
func (*AdmissionRequestInfoObject) DeepCopyInto ¶
func (in *AdmissionRequestInfoObject) DeepCopyInto(out *AdmissionRequestInfoObject)
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,omitempty" yaml:"roles,omitempty"` // ClusterRoles is a list of possible clusterRoles send the request. // +nullable // +optional ClusterRoles []string `json:"clusterRoles,omitempty" yaml:"clusterRoles,omitempty"` // 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"` // ResourceSpec is the information to identify the trigger resource. 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"` // Rule is the associate rule name of the current UR. Rule string `json:"rule" yaml:"rule"` // DeleteDownstream represents whether the downstream needs to be deleted. DeleteDownstream bool `json:"deleteDownstream" yaml:"deleteDownstream"` // Synchronize represents the sync behavior of the corresponding rule // Optional. Defaults to "false" if not specified. Synchronize bool `json:"synchronize,omitempty" yaml:"synchronize,omitempty"` // ResourceSpec is the information to identify the trigger resource. 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) GetPolicyKey ¶ added in v1.10.0
func (s *UpdateRequestSpec) GetPolicyKey() string
func (*UpdateRequestSpec) GetRequestType ¶
func (s *UpdateRequestSpec) GetRequestType() RequestType
func (*UpdateRequestSpec) GetResource ¶ added in v1.10.0
func (s *UpdateRequestSpec) GetResource() kyvernov1.ResourceSpec
func (*UpdateRequestSpec) GetRuleName ¶ added in v1.10.0
func (s *UpdateRequestSpec) GetRuleName() string
func (*UpdateRequestSpec) GetSynchronize ¶ added in v1.10.0
func (s *UpdateRequestSpec) GetSynchronize() bool
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 ¶
func (in *UpdateRequestSpecContext) DeepCopy() *UpdateRequestSpecContext
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 { // Deprecated 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.