Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the controlplane v1beta1 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io +k8s:defaulter-gen=TypeMeta
Index ¶
- Constants
- Variables
- type CK8sControlPlane
- func (in *CK8sControlPlane) DeepCopy() *CK8sControlPlane
- func (in *CK8sControlPlane) DeepCopyInto(out *CK8sControlPlane)
- func (in *CK8sControlPlane) DeepCopyObject() runtime.Object
- func (in *CK8sControlPlane) Default(_ context.Context, obj runtime.Object) error
- func (in *CK8sControlPlane) GetConditions() clusterv1.Conditions
- func (*CK8sControlPlane) Hub()
- func (in *CK8sControlPlane) SetConditions(conditions clusterv1.Conditions)
- func (in *CK8sControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *CK8sControlPlane) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (in *CK8sControlPlane) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (in *CK8sControlPlane) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error)
- type CK8sControlPlaneList
- type CK8sControlPlaneMachineTemplate
- type CK8sControlPlaneSpec
- type CK8sControlPlaneStatus
- type CK8sControlPlaneTemplate
- type CK8sControlPlaneTemplateList
- type CK8sControlPlaneTemplateResource
- type CK8sControlPlaneTemplateResourceSpec
- type CK8sControlPlaneTemplateSpec
- type LastRemediationStatus
- type RemediationStrategy
Constants ¶
const ( CK8sControlPlaneFinalizer = "ck8s.controlplane.cluster.x-k8s.io" // CK8sServerConfigurationAnnotation is a machine annotation that stores the json-marshalled string of KCP ClusterConfiguration. // This annotation is used to detect any changes in ClusterConfiguration and trigger machine rollout in KCP. CK8sServerConfigurationAnnotation = "controlplane.cluster.x-k8s.io/ck8s-server-configuration" // RemediationInProgressAnnotation is used to keep track that a KCP remediation is in progress, and more // specifically it tracks that the system is in between having deleted an unhealthy machine and recreating its replacement. // NOTE: if something external to CAPI removes this annotation the system cannot detect the above situation; this can lead to // failures in updating remediation retry or remediation count (both counters restart from zero). RemediationInProgressAnnotation = "controlplane.cluster.x-k8s.io/remediation-in-progress" // RemediationForAnnotation is used to link a new machine to the unhealthy machine it is replacing; // please note that in case of retry, when also the remediating machine fails, the system keeps track of // the first machine of the sequence only. // NOTE: if something external to CAPI removes this annotation the system this can lead to // failures in updating remediation retry (the counter restarts from zero). RemediationForAnnotation = "controlplane.cluster.x-k8s.io/remediation-for" // DefaultMinHealthyPeriod defines the default minimum period before we consider a remediation on a // machine unrelated from the previous remediation. DefaultMinHealthyPeriod = 1 * time.Hour )
const ( // CertificatesAvailableCondition documents that cluster certificates were generated as part of the // processing of a CK8sControlPlane object. CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable" // CertificatesGenerationFailedReason (Severity=Warning) documents a CK8sControlPlane controller detecting // an error while generating certificates; those kind of errors are usually temporary and the controller // automatically recover from them. CertificatesGenerationFailedReason = "CertificatesGenerationFailed" )
const ( // AvailableCondition documents that the first control plane instance has completed the server init operation // and so the control plane is available and an API server instance is ready for processing requests. AvailableCondition clusterv1.ConditionType = "Available" // WaitingForCK8sServerReason (Severity=Info) documents a CK8sControlPlane object waiting for the first // control plane instance to complete the ck8s server operation. WaitingForCK8sServerReason = "WaitingForCK8sServer" )
const ( // MachinesSpecUpToDateCondition documents that the spec of the machines controlled by the CK8sControlPlane // is up to date. Whe this condition is false, the CK8sControlPlane is executing a rolling upgrade. MachinesSpecUpToDateCondition clusterv1.ConditionType = "MachinesSpecUpToDate" // RollingUpdateInProgressReason (Severity=Warning) documents a CK8sControlPlane object executing a // rolling upgrade for aligning the machines spec to the desired state. RollingUpdateInProgressReason = "RollingUpdateInProgress" )
const ( // ResizedCondition documents a CK8sControlPlane that is resizing the set of controlled machines. ResizedCondition clusterv1.ConditionType = "Resized" // ScalingUpReason (Severity=Info) documents a CK8sControlPlane that is increasing the number of replicas. ScalingUpReason = "ScalingUp" // ScalingDownReason (Severity=Info) documents a CK8sControlPlane that is decreasing the number of replicas. ScalingDownReason = "ScalingDown" )
const ( // ControlPlaneComponentsHealthyCondition reports the overall status of the control plane. ControlPlaneComponentsHealthyCondition clusterv1.ConditionType = "ControlPlaneComponentsHealthy" // ControlPlaneComponentsUnhealthyReason (Severity=Error) documents a control plane component not healthy. ControlPlaneComponentsUnhealthyReason = "ControlPlaneComponentsUnhealthy" // ControlPlaneComponentsUnknownReason reports a control plane component in unknown status. ControlPlaneComponentsUnknownReason = "ControlPlaneComponentsUnknown" // ControlPlaneComponentsInspectionFailedReason documents a failure in inspecting the control plane component status. ControlPlaneComponentsInspectionFailedReason = "ControlPlaneComponentsInspectionFailed" // MachineAgentHealthyCondition reports a machine's operational status. MachineAgentHealthyCondition clusterv1.ConditionType = "AgentHealthy" // PodProvisioningReason (Severity=Info) documents a pod waiting to be provisioned i.e., Pod is in "Pending" phase. PodProvisioningReason = "PodProvisioning" // PodMissingReason (Severity=Error) documents a pod does not exist. PodMissingReason = "PodMissing" // PodFailedReason (Severity=Error) documents if a pod failed during provisioning i.e., e.g CrashLoopbackOff, ImagePullBackOff // or if all the containers in a pod have terminated. PodFailedReason = "PodFailed" // PodInspectionFailedReason documents a failure in inspecting the pod status. PodInspectionFailedReason = "PodInspectionFailed" )
const ( // TokenAvailableCondition documents whether the token required for nodes to join the cluster is available. TokenAvailableCondition clusterv1.ConditionType = "TokenAvailable" // TokenGenerationFailedReason documents that the token required for nodes to join the cluster could not be generated. TokenGenerationFailedReason = "TokenGenerationFailed" )
const ( // MachinesReady reports an aggregate of current status of the machines controlled by the CK8sControlPlane. MachinesReadyCondition clusterv1.ConditionType = "MachinesReady" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta2"} // 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 ¶
This section is empty.
Types ¶
type CK8sControlPlane ¶
type CK8sControlPlane struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CK8sControlPlaneSpec `json:"spec,omitempty"` Status CK8sControlPlaneStatus `json:"status,omitempty"` }
CK8sControlPlane is the Schema for the ck8scontrolplanes API.
func (*CK8sControlPlane) DeepCopy ¶
func (in *CK8sControlPlane) DeepCopy() *CK8sControlPlane
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlane.
func (*CK8sControlPlane) DeepCopyInto ¶
func (in *CK8sControlPlane) DeepCopyInto(out *CK8sControlPlane)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CK8sControlPlane) DeepCopyObject ¶
func (in *CK8sControlPlane) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CK8sControlPlane) GetConditions ¶
func (in *CK8sControlPlane) GetConditions() clusterv1.Conditions
func (*CK8sControlPlane) Hub ¶
func (*CK8sControlPlane) Hub()
Hub marks CK8sControlPlane as a conversion hub.
func (*CK8sControlPlane) SetConditions ¶
func (in *CK8sControlPlane) SetConditions(conditions clusterv1.Conditions)
func (*CK8sControlPlane) SetupWebhookWithManager ¶
func (in *CK8sControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager will setup the webhooks for the CK8sControlPlane.
func (*CK8sControlPlane) ValidateCreate ¶
func (in *CK8sControlPlane) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error)
ValidateCreate will do any extra validation when creating a CK8sControlPlane.
func (*CK8sControlPlane) ValidateDelete ¶
func (in *CK8sControlPlane) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
ValidateDelete allows you to add any extra validation when deleting.
func (*CK8sControlPlane) ValidateUpdate ¶
func (in *CK8sControlPlane) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error)
ValidateUpdate will do any extra validation when updating a CK8sControlPlane.
type CK8sControlPlaneList ¶
type CK8sControlPlaneList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CK8sControlPlane `json:"items"` }
CK8sControlPlaneList contains a list of CK8sControlPlane.
func (*CK8sControlPlaneList) DeepCopy ¶
func (in *CK8sControlPlaneList) DeepCopy() *CK8sControlPlaneList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneList.
func (*CK8sControlPlaneList) DeepCopyInto ¶
func (in *CK8sControlPlaneList) DeepCopyInto(out *CK8sControlPlaneList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CK8sControlPlaneList) DeepCopyObject ¶
func (in *CK8sControlPlaneList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CK8sControlPlaneList) Hub ¶
func (*CK8sControlPlaneList) Hub()
Hub marks CK8sControlPlaneList as a conversion hub.
type CK8sControlPlaneMachineTemplate ¶
type CK8sControlPlaneMachineTemplate struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` // InfrastructureRef is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureRef corev1.ObjectReference `json:"infrastructureTemplate"` // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` // NodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // If no value is provided, the default value for this property of the Machine resource will be used. // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` }
MachineTemplate contains information about how machines should be shaped when creating or updating a control plane.
func (*CK8sControlPlaneMachineTemplate) DeepCopy ¶
func (in *CK8sControlPlaneMachineTemplate) DeepCopy() *CK8sControlPlaneMachineTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneMachineTemplate.
func (*CK8sControlPlaneMachineTemplate) DeepCopyInto ¶
func (in *CK8sControlPlaneMachineTemplate) DeepCopyInto(out *CK8sControlPlaneMachineTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CK8sControlPlaneSpec ¶
type CK8sControlPlaneSpec struct { // Number of desired machines. Defaults to 1. When stacked etcd is used only // odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). // This is a pointer to distinguish between explicit zero and not specified. // +optional Replicas *int32 `json:"replicas,omitempty"` // Version defines the desired Kubernetes version. Version string `json:"version"` // CK8sConfigSpec is a CK8sConfigSpec // to use for initializing and joining machines to the control plane. // +optional CK8sConfigSpec bootstrapv1.CK8sConfigSpec `json:"spec,omitempty"` // RolloutAfter is a field to indicate a rollout should be performed // after the specified time even if no changes have been made to the // CK8sControlPlane // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` // MachineTemplate contains information about how machines should be shaped // when creating or updating a control plane. MachineTemplate CK8sControlPlaneMachineTemplate `json:"machineTemplate,omitempty"` // The RemediationStrategy that controls how control plane machine remediation happens. // +optional RemediationStrategy *RemediationStrategy `json:"remediationStrategy,omitempty"` }
CK8sControlPlaneSpec defines the desired state of CK8sControlPlane.
func (*CK8sControlPlaneSpec) DeepCopy ¶
func (in *CK8sControlPlaneSpec) DeepCopy() *CK8sControlPlaneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneSpec.
func (*CK8sControlPlaneSpec) DeepCopyInto ¶
func (in *CK8sControlPlaneSpec) DeepCopyInto(out *CK8sControlPlaneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CK8sControlPlaneStatus ¶
type CK8sControlPlaneStatus struct { // Selector is the label selector in string format to avoid introspection // by clients, and is used to provide the CRD-based integration for the // scale subresource and additional integrations for things like kubectl // describe.. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional Selector string `json:"selector,omitempty"` // Total number of non-terminated machines targeted by this control plane // (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty"` // Total number of non-terminated machines targeted by this control plane // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` // Total number of fully running and ready control plane machines. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet ready or machines // that still have not been created. // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` // Initialized denotes whether or not the control plane is initialized. // +optional Initialized bool `json:"initialized"` // Ready denotes that the CK8sControlPlane API Server is ready to // receive requests. // +optional Ready bool `json:"ready"` // FailureReason indicates that there is a terminal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional FailureReason errors.CK8sControlPlaneStatusError `json:"failureReason,omitempty"` // ErrorMessage indicates that there is a terminal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` // ObservedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Conditions defines current service state of the CK8sControlPlane. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` // LastRemediation stores info about last remediation performed. // +optional LastRemediation *LastRemediationStatus `json:"lastRemediation,omitempty"` }
CK8sControlPlaneStatus defines the observed state of CK8sControlPlane.
func (*CK8sControlPlaneStatus) DeepCopy ¶
func (in *CK8sControlPlaneStatus) DeepCopy() *CK8sControlPlaneStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneStatus.
func (*CK8sControlPlaneStatus) DeepCopyInto ¶
func (in *CK8sControlPlaneStatus) DeepCopyInto(out *CK8sControlPlaneStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CK8sControlPlaneTemplate ¶
type CK8sControlPlaneTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CK8sControlPlaneTemplateSpec `json:"spec,omitempty"` }
CK8sControlPlaneTemplate is the Schema for the ck8scontrolplanetemplate API.
func (*CK8sControlPlaneTemplate) DeepCopy ¶
func (in *CK8sControlPlaneTemplate) DeepCopy() *CK8sControlPlaneTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneTemplate.
func (*CK8sControlPlaneTemplate) DeepCopyInto ¶
func (in *CK8sControlPlaneTemplate) DeepCopyInto(out *CK8sControlPlaneTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CK8sControlPlaneTemplate) DeepCopyObject ¶
func (in *CK8sControlPlaneTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CK8sControlPlaneTemplateList ¶
type CK8sControlPlaneTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CK8sControlPlaneTemplate `json:"items"` }
CK8sControlPlaneTemplateList contains a list of CK8sControlPlaneTemplate.
func (*CK8sControlPlaneTemplateList) DeepCopy ¶
func (in *CK8sControlPlaneTemplateList) DeepCopy() *CK8sControlPlaneTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneTemplateList.
func (*CK8sControlPlaneTemplateList) DeepCopyInto ¶
func (in *CK8sControlPlaneTemplateList) DeepCopyInto(out *CK8sControlPlaneTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CK8sControlPlaneTemplateList) DeepCopyObject ¶
func (in *CK8sControlPlaneTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CK8sControlPlaneTemplateResource ¶
type CK8sControlPlaneTemplateResource struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty"` Spec CK8sControlPlaneTemplateResourceSpec `json:"spec"` }
func (*CK8sControlPlaneTemplateResource) DeepCopy ¶
func (in *CK8sControlPlaneTemplateResource) DeepCopy() *CK8sControlPlaneTemplateResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneTemplateResource.
func (*CK8sControlPlaneTemplateResource) DeepCopyInto ¶
func (in *CK8sControlPlaneTemplateResource) DeepCopyInto(out *CK8sControlPlaneTemplateResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CK8sControlPlaneTemplateResourceSpec ¶
type CK8sControlPlaneTemplateResourceSpec struct { // CK8sConfigSpec is a CK8sConfigSpec // to use for initializing and joining machines to the control plane. // +optional CK8sConfigSpec bootstrapv1beta2.CK8sConfigSpec `json:"spec,omitempty"` // RolloutAfter is a field to indicate an rollout should be performed // after the specified time even if no changes have been made to the // CK8sControlPlane // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` // MachineTemplate contains information about how machines should be shaped // when creating or updating a control plane. MachineTemplate CK8sControlPlaneMachineTemplate `json:"machineTemplate,omitempty"` // The RemediationStrategy that controls how control plane machine remediation happens. // +optional RemediationStrategy *RemediationStrategy `json:"remediationStrategy,omitempty"` }
func (*CK8sControlPlaneTemplateResourceSpec) DeepCopy ¶
func (in *CK8sControlPlaneTemplateResourceSpec) DeepCopy() *CK8sControlPlaneTemplateResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneTemplateResourceSpec.
func (*CK8sControlPlaneTemplateResourceSpec) DeepCopyInto ¶
func (in *CK8sControlPlaneTemplateResourceSpec) DeepCopyInto(out *CK8sControlPlaneTemplateResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CK8sControlPlaneTemplateSpec ¶
type CK8sControlPlaneTemplateSpec struct {
Template CK8sControlPlaneTemplateResource `json:"template"`
}
CK8sControlPlaneTemplateSpec defines the desired state of CK8sControlPlaneTemplateSpec.
func (*CK8sControlPlaneTemplateSpec) DeepCopy ¶
func (in *CK8sControlPlaneTemplateSpec) DeepCopy() *CK8sControlPlaneTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CK8sControlPlaneTemplateSpec.
func (*CK8sControlPlaneTemplateSpec) DeepCopyInto ¶
func (in *CK8sControlPlaneTemplateSpec) DeepCopyInto(out *CK8sControlPlaneTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LastRemediationStatus ¶
type LastRemediationStatus struct { // Machine is the machine name of the latest machine being remediated. Machine string `json:"machine"` // Timestamp is when last remediation happened. It is represented in RFC3339 form and is in UTC. Timestamp metav1.Time `json:"timestamp"` // RetryCount used to keep track of remediation retry for the last remediated machine. // A retry happens when a machine that was created as a replacement for an unhealthy machine also fails. RetryCount int32 `json:"retryCount"` }
LastRemediationStatus stores info about last remediation performed. NOTE: if for any reason information about last remediation are lost, RetryCount is going to restart from 0 and thus more remediations than expected might happen.
func (*LastRemediationStatus) DeepCopy ¶
func (in *LastRemediationStatus) DeepCopy() *LastRemediationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastRemediationStatus.
func (*LastRemediationStatus) DeepCopyInto ¶
func (in *LastRemediationStatus) DeepCopyInto(out *LastRemediationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemediationStrategy ¶
type RemediationStrategy struct { // MaxRetry is the Max number of retries while attempting to remediate an unhealthy machine. // A retry happens when a machine that was created as a replacement for an unhealthy machine also fails. // For example, given a control plane with three machines M1, M2, M3: // // M1 become unhealthy; remediation happens, and M1-1 is created as a replacement. // If M1-1 (replacement of M1) has problems while bootstrapping it will become unhealthy, and then be // remediated; such operation is considered a retry, remediation-retry #1. // If M1-2 (replacement of M1-1) becomes unhealthy, remediation-retry #2 will happen, etc. // // A retry could happen only after RetryPeriod from the previous retry. // If a machine is marked as unhealthy after MinHealthyPeriod from the previous remediation expired, // this is not considered a retry anymore because the new issue is assumed unrelated from the previous one. // // If not set, the remedation will be retried infinitely. // +optional MaxRetry *int32 `json:"maxRetry,omitempty"` // RetryPeriod is the duration that KCP should wait before remediating a machine being created as a replacement // for an unhealthy machine (a retry). // // If not set, a retry will happen immediately. // +optional RetryPeriod metav1.Duration `json:"retryPeriod,omitempty"` // MinHealthyPeriod defines the duration after which KCP will consider any failure to a machine unrelated // from the previous one. In this case the remediation is not considered a retry anymore, and thus the retry // counter restarts from 0. For example, assuming MinHealthyPeriod is set to 1h (default) // // M1 become unhealthy; remediation happens, and M1-1 is created as a replacement. // If M1-1 (replacement of M1) has problems within the 1hr after the creation, also // this machine will be remediated and this operation is considered a retry - a problem related // to the original issue happened to M1 -. // // If instead the problem on M1-1 is happening after MinHealthyPeriod expired, e.g. four days after // m1-1 has been created as a remediation of M1, the problem on M1-1 is considered unrelated to // the original issue happened to M1. // // If not set, this value is defaulted to 1h. // +optional MinHealthyPeriod *metav1.Duration `json:"minHealthyPeriod,omitempty"` }
RemediationStrategy allows to define how control plane machine remediation happens.
func (*RemediationStrategy) DeepCopy ¶
func (in *RemediationStrategy) DeepCopy() *RemediationStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemediationStrategy.
func (*RemediationStrategy) DeepCopyInto ¶
func (in *RemediationStrategy) DeepCopyInto(out *RemediationStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.