Documentation ¶
Overview ¶
+k8s:openapi-gen=true +groupName=policy.kruise.io
Package v1alpha1 contains API Schema definitions for the policy v1alpha1 API group +kubebuilder:object:generate=true +groupName=policy.kruise.io
Index ¶
Constants ¶
const ( // PubProtectOperationAnnotation indicates the pub protected Operation[DELETE,UPDATE,EVICT] // if annotations[kruise.io/pub-protect-operations]=EVICT indicates the pub only protect evict pod // if the annotations do not exist, the default DELETE,EVICT,UPDATE are protected PubProtectOperationAnnotation = "kruise.io/pub-protect-operations" // pod webhook operation PubUpdateOperation PubOperation = "UPDATE" PubDeleteOperation PubOperation = "DELETE" PubEvictOperation PubOperation = "EVICT" // PubProtectTotalReplicas indicates the pub protected total replicas, rather than workload.spec.replicas. // and must be used with pub.spec.selector. PubProtectTotalReplicas = "pub.kruise.io/protect-total-replicas" // Marked the pod will not be pub-protected, solving the scenario of force pod deletion PodPubNoProtectionAnnotation = "pub.kruise.io/no-protect" )
const ( // DeletionProtectionKey is a key in object labels and its value can be Always and Cascading. // Currently supports Namespace, CustomResourcesDefinition, Deployment, StatefulSet, ReplicaSet, CloneSet, Advanced StatefulSet, UnitedDeployment. DeletionProtectionKey = "policy.kruise.io/delete-protection" // DeletionProtectionTypeAlways indicates this object will always be forbidden to be deleted, unless the label is removed. DeletionProtectionTypeAlways = "Always" // DeletionProtectionTypeCascading indicates this object will be forbidden to be deleted, if it has active resources owned. DeletionProtectionTypeCascading = "Cascading" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "policy.kruise.io", Version: "v1alpha1"} SchemeGroupVersion = GroupVersion // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type PodUnavailableBudget ¶ added in v0.10.0
type PodUnavailableBudget struct {}
PodUnavailableBudget is the Schema for the podunavailablebudgets API
func (*PodUnavailableBudget) DeepCopy ¶ added in v0.10.0
func (in *PodUnavailableBudget) DeepCopy() *PodUnavailableBudget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodUnavailableBudget.
func (*PodUnavailableBudget) DeepCopyInto ¶ added in v0.10.0
func (in *PodUnavailableBudget) DeepCopyInto(out *PodUnavailableBudget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodUnavailableBudget) DeepCopyObject ¶ added in v0.10.0
func (in *PodUnavailableBudget) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodUnavailableBudgetList ¶ added in v0.10.0
type PodUnavailableBudgetList struct {}
PodUnavailableBudgetList contains a list of PodUnavailableBudget
func (*PodUnavailableBudgetList) DeepCopy ¶ added in v0.10.0
func (in *PodUnavailableBudgetList) DeepCopy() *PodUnavailableBudgetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodUnavailableBudgetList.
func (*PodUnavailableBudgetList) DeepCopyInto ¶ added in v0.10.0
func (in *PodUnavailableBudgetList) DeepCopyInto(out *PodUnavailableBudgetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodUnavailableBudgetList) DeepCopyObject ¶ added in v0.10.0
func (in *PodUnavailableBudgetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodUnavailableBudgetSpec ¶ added in v0.10.0
type PodUnavailableBudgetSpec struct { metav1.LabelSelector `json:"selector,omitempty"` // Selector and TargetReference are mutually exclusive, TargetReference is priority to take effect TargetReference *TargetReference `json:"targetRef,omitempty"` // "selector" or "targetRef" are unavailable after the above operation for pod. // MaxUnavailable and MinAvailable are mutually exclusive, MaxUnavailable is priority to take effect MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` // "selector" or "targetRef" will still be available after the above operation for pod. MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` }Selector *
PodUnavailableBudgetSpec defines the desired state of PodUnavailableBudget
func (*PodUnavailableBudgetSpec) DeepCopy ¶ added in v0.10.0
func (in *PodUnavailableBudgetSpec) DeepCopy() *PodUnavailableBudgetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodUnavailableBudgetSpec.
func (*PodUnavailableBudgetSpec) DeepCopyInto ¶ added in v0.10.0
func (in *PodUnavailableBudgetSpec) DeepCopyInto(out *PodUnavailableBudgetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodUnavailableBudgetStatus ¶ added in v0.10.0
type PodUnavailableBudgetStatus struct { // status information is valid only if observedGeneration equals to PUB's object generation. // +optional ObservedGeneration int64 `json:"observedGeneration"` // processed by the API handler but has not yet been observed by the PodUnavailableBudget. // +optional DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty"` // once pod is available(consistent and ready) again, it will be removed from the list. // +optional UnavailablePods map[string]metav1.Time `json:"unavailablePods,omitempty"` UnavailableAllowed int32 `json:"unavailableAllowed"` CurrentAvailable int32 `json:"currentAvailable"` DesiredAvailable int32 `json:"desiredAvailable"` TotalReplicas int32 `json:"totalReplicas"` }
PodUnavailableBudgetStatus defines the observed state of PodUnavailableBudget
func (*PodUnavailableBudgetStatus) DeepCopy ¶ added in v0.10.0
func (in *PodUnavailableBudgetStatus) DeepCopy() *PodUnavailableBudgetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodUnavailableBudgetStatus.
func (*PodUnavailableBudgetStatus) DeepCopyInto ¶ added in v0.10.0
func (in *PodUnavailableBudgetStatus) DeepCopyInto(out *PodUnavailableBudgetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PubOperation ¶ added in v1.3.0
type PubOperation string
type TargetReference ¶ added in v0.10.0
type TargetReference struct { // API version of the referent. APIVersion string `json:"apiVersion,omitempty"` // Kind of the referent. Kind string `json:"kind,omitempty"` // Name of the referent. Name string `json:"name,omitempty"` }
TargetReference contains enough information to let you identify an workload for PodUnavailableBudget
func (*TargetReference) DeepCopy ¶ added in v0.10.0
func (in *TargetReference) DeepCopy() *TargetReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetReference.
func (*TargetReference) DeepCopyInto ¶ added in v0.10.0
func (in *TargetReference) DeepCopyInto(out *TargetReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.