v1beta1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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.

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 +k8s:conversion-gen=github.com/k3s-io/cluster-api-k3s/controlplane/api/v1beta2

Index

Constants

View Source
const (
	// CertificatesAvailableCondition documents that cluster certificates were generated as part of the
	// processing of a KThreesControlPlane object.
	CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable"

	// CertificatesGenerationFailedReason (Severity=Warning) documents a KThreesControlPlane controller detecting
	// an error while generating certificates; those kind of errors are usually temporary and the controller
	// automatically recover from them.
	CertificatesGenerationFailedReason = "CertificatesGenerationFailed"
)
View Source
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"

	// WaitingForKthreesServerReason (Severity=Info) documents a KThreesControlPlane object waiting for the first
	// control plane instance to complete the k3s server operation.
	WaitingForKthreesServerReason = "WaitingForKthreesServer"
)
View Source
const (
	// MachinesSpecUpToDateCondition documents that the spec of the machines controlled by the KThreesControlPlane
	// is up to date. Whe this condition is false, the KThreesControlPlane is executing a rolling upgrade.
	MachinesSpecUpToDateCondition clusterv1.ConditionType = "MachinesSpecUpToDate"

	// RollingUpdateInProgressReason (Severity=Warning) documents a KThreesControlPlane object executing a
	// rolling upgrade for aligning the machines spec to the desired state.
	RollingUpdateInProgressReason = "RollingUpdateInProgress"
)
View Source
const (
	// ResizedCondition documents a KThreesControlPlane that is resizing the set of controlled machines.
	ResizedCondition clusterv1.ConditionType = "Resized"

	// ScalingUpReason (Severity=Info) documents a KThreesControlPlane that is increasing the number of replicas.
	ScalingUpReason = "ScalingUp"

	// ScalingDownReason (Severity=Info) documents a KThreesControlPlane that is decreasing the number of replicas.
	ScalingDownReason = "ScalingDown"
)
View Source
const (
	// ControlPlaneComponentsHealthyCondition reports the overall status of the k3s server.
	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 k3s agent'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"
)
View Source
const (
	// EtcdClusterHealthyCondition documents the overall etcd cluster's health.
	EtcdClusterHealthyCondition clusterv1.ConditionType = "EtcdClusterHealthyCondition"

	// EtcdClusterInspectionFailedReason documents a failure in inspecting the etcd cluster status.
	EtcdClusterInspectionFailedReason = "EtcdClusterInspectionFailed"

	// EtcdClusterUnknownReason reports an etcd cluster in unknown status.
	EtcdClusterUnknownReason = "EtcdClusterUnknown"

	// EtcdClusterUnhealthyReason (Severity=Error) is set when the etcd cluster is unhealthy.
	EtcdClusterUnhealthyReason = "EtcdClusterUnhealthy"

	// MachineEtcdMemberHealthyCondition report the machine's etcd member's health status.
	// NOTE: This conditions exists only if a stacked etcd cluster is used.
	MachineEtcdMemberHealthyCondition clusterv1.ConditionType = "EtcdMemberHealthy"

	// EtcdMemberInspectionFailedReason documents a failure in inspecting the etcd member status.
	EtcdMemberInspectionFailedReason = "MemberInspectionFailed"

	// EtcdMemberUnhealthyReason (Severity=Error) documents a Machine's etcd member is unhealthy.
	EtcdMemberUnhealthyReason = "EtcdMemberUnhealthy"
)
View Source
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"
)
View Source
const (
	KThreesControlPlaneFinalizer = "kthrees.controlplane.cluster.x-k8s.io"

	// KThreesServerConfigurationAnnotation 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.
	KThreesServerConfigurationAnnotation = "controlplane.cluster.x-k8s.io/kthrees-server-configuration"

	// SkipCoreDNSAnnotation annotation explicitly skips reconciling CoreDNS if set.
	SkipCoreDNSAnnotation = "controlplane.cluster.x-k8s.io/skip-coredns"

	// 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
)
View Source
const (
	// MachinesReady reports an aggregate of current status of the machines controlled by the KThreesControlPlane.
	MachinesReadyCondition clusterv1.ConditionType = "MachinesReady"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta1"}

	// 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 Convert_v1beta1_KThreesControlPlaneList_To_v1beta2_KThreesControlPlaneList

func Convert_v1beta1_KThreesControlPlaneList_To_v1beta2_KThreesControlPlaneList(in *KThreesControlPlaneList, out *v1beta2.KThreesControlPlaneList, s conversion.Scope) error

Convert_v1beta1_KThreesControlPlaneList_To_v1beta2_KThreesControlPlaneList is an autogenerated conversion function.

func Convert_v1beta1_KThreesControlPlaneMachineTemplate_To_v1beta2_KThreesControlPlaneMachineTemplate

func Convert_v1beta1_KThreesControlPlaneMachineTemplate_To_v1beta2_KThreesControlPlaneMachineTemplate(in *KThreesControlPlaneMachineTemplate, out *v1beta2.KThreesControlPlaneMachineTemplate, s conversion.Scope) error

Convert_v1beta1_KThreesControlPlaneMachineTemplate_To_v1beta2_KThreesControlPlaneMachineTemplate is an autogenerated conversion function.

func Convert_v1beta1_KThreesControlPlaneSpec_To_v1beta2_KThreesControlPlaneSpec

func Convert_v1beta1_KThreesControlPlaneSpec_To_v1beta2_KThreesControlPlaneSpec(in *KThreesControlPlaneSpec, out *controlplanev1beta2.KThreesControlPlaneSpec, s conversion.Scope) error

func Convert_v1beta1_KThreesControlPlaneStatus_To_v1beta2_KThreesControlPlaneStatus

func Convert_v1beta1_KThreesControlPlaneStatus_To_v1beta2_KThreesControlPlaneStatus(in *KThreesControlPlaneStatus, out *v1beta2.KThreesControlPlaneStatus, s conversion.Scope) error

Convert_v1beta1_KThreesControlPlaneStatus_To_v1beta2_KThreesControlPlaneStatus is an autogenerated conversion function.

func Convert_v1beta1_KThreesControlPlane_To_v1beta2_KThreesControlPlane

func Convert_v1beta1_KThreesControlPlane_To_v1beta2_KThreesControlPlane(in *KThreesControlPlane, out *v1beta2.KThreesControlPlane, s conversion.Scope) error

Convert_v1beta1_KThreesControlPlane_To_v1beta2_KThreesControlPlane is an autogenerated conversion function.

func Convert_v1beta1_LastRemediationStatus_To_v1beta2_LastRemediationStatus

func Convert_v1beta1_LastRemediationStatus_To_v1beta2_LastRemediationStatus(in *LastRemediationStatus, out *v1beta2.LastRemediationStatus, s conversion.Scope) error

Convert_v1beta1_LastRemediationStatus_To_v1beta2_LastRemediationStatus is an autogenerated conversion function.

func Convert_v1beta1_RemediationStrategy_To_v1beta2_RemediationStrategy

func Convert_v1beta1_RemediationStrategy_To_v1beta2_RemediationStrategy(in *RemediationStrategy, out *v1beta2.RemediationStrategy, s conversion.Scope) error

Convert_v1beta1_RemediationStrategy_To_v1beta2_RemediationStrategy is an autogenerated conversion function.

func Convert_v1beta2_KThreesControlPlaneList_To_v1beta1_KThreesControlPlaneList

func Convert_v1beta2_KThreesControlPlaneList_To_v1beta1_KThreesControlPlaneList(in *v1beta2.KThreesControlPlaneList, out *KThreesControlPlaneList, s conversion.Scope) error

Convert_v1beta2_KThreesControlPlaneList_To_v1beta1_KThreesControlPlaneList is an autogenerated conversion function.

func Convert_v1beta2_KThreesControlPlaneSpec_To_v1beta1_KThreesControlPlaneSpec

func Convert_v1beta2_KThreesControlPlaneSpec_To_v1beta1_KThreesControlPlaneSpec(in *controlplanev1beta2.KThreesControlPlaneSpec, out *KThreesControlPlaneSpec, s conversion.Scope) error

func Convert_v1beta2_KThreesControlPlane_To_v1beta1_KThreesControlPlane

func Convert_v1beta2_KThreesControlPlane_To_v1beta1_KThreesControlPlane(in *v1beta2.KThreesControlPlane, out *KThreesControlPlane, s conversion.Scope) error

Convert_v1beta2_KThreesControlPlane_To_v1beta1_KThreesControlPlane is an autogenerated conversion function.

func Convert_v1beta2_LastRemediationStatus_To_v1beta1_LastRemediationStatus

func Convert_v1beta2_LastRemediationStatus_To_v1beta1_LastRemediationStatus(in *v1beta2.LastRemediationStatus, out *LastRemediationStatus, s conversion.Scope) error

Convert_v1beta2_LastRemediationStatus_To_v1beta1_LastRemediationStatus is an autogenerated conversion function.

func Convert_v1beta2_RemediationStrategy_To_v1beta1_RemediationStrategy

func Convert_v1beta2_RemediationStrategy_To_v1beta1_RemediationStrategy(in *v1beta2.RemediationStrategy, out *RemediationStrategy, s conversion.Scope) error

Convert_v1beta2_RemediationStrategy_To_v1beta1_RemediationStrategy is an autogenerated conversion function.

func RegisterConversions

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

Types

type KThreesControlPlane

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

	Spec   KThreesControlPlaneSpec   `json:"spec,omitempty"`
	Status KThreesControlPlaneStatus `json:"status,omitempty"`
}

KThreesControlPlane is the Schema for the kthreescontrolplanes API.

func (*KThreesControlPlane) ConvertFrom

func (in *KThreesControlPlane) ConvertFrom(srcRaw ctrlconversion.Hub) error

ConvertFrom converts the v1beta1 KThreesControlPlane receiver from a v1beta2 KThreesControlPlane.

func (*KThreesControlPlane) ConvertTo

func (in *KThreesControlPlane) ConvertTo(dstRaw ctrlconversion.Hub) error

ConvertTo converts the v1beta1 KThreesControlPlane receiver to a v1beta2 KThreesControlPlane.

func (*KThreesControlPlane) DeepCopy

func (in *KThreesControlPlane) DeepCopy() *KThreesControlPlane

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

func (*KThreesControlPlane) DeepCopyInto

func (in *KThreesControlPlane) DeepCopyInto(out *KThreesControlPlane)

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

func (*KThreesControlPlane) DeepCopyObject

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

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

func (*KThreesControlPlane) GetConditions

func (in *KThreesControlPlane) GetConditions() clusterv1.Conditions

func (*KThreesControlPlane) SetConditions

func (in *KThreesControlPlane) SetConditions(conditions clusterv1.Conditions)

type KThreesControlPlaneList

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

KThreesControlPlaneList contains a list of KThreesControlPlane.

func (*KThreesControlPlaneList) ConvertFrom

func (in *KThreesControlPlaneList) ConvertFrom(srcRaw ctrlconversion.Hub) error

ConvertFrom converts the v1beta1 KThreesControlPlaneList receiver from a v1beta2 KThreesControlPlaneList.

func (*KThreesControlPlaneList) ConvertTo

func (in *KThreesControlPlaneList) ConvertTo(dstRaw ctrlconversion.Hub) error

ConvertTo converts the v1beta1 KThreesControlPlaneList receiver to a v1beta2 KThreesControlPlaneList.

func (*KThreesControlPlaneList) DeepCopy

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

func (*KThreesControlPlaneList) DeepCopyInto

func (in *KThreesControlPlaneList) DeepCopyInto(out *KThreesControlPlaneList)

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

func (*KThreesControlPlaneList) DeepCopyObject

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

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

type KThreesControlPlaneMachineTemplate

type KThreesControlPlaneMachineTemplate 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"`
}

MachineTemplate contains information about how machines should be shaped when creating or updating a control plane. In the next API version we will move the InfrastructureTemplate field into this struct. See https://github.com/k3s-io/cluster-api-k3s/issues/62

func (*KThreesControlPlaneMachineTemplate) DeepCopy

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

func (*KThreesControlPlaneMachineTemplate) DeepCopyInto

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

type KThreesControlPlaneSpec

type KThreesControlPlaneSpec 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"`

	// InfrastructureTemplate is a required reference to a custom resource
	// offered by an infrastructure provider.
	// In the next API version we will move this into the
	// `KThreesControlPlaneMachineTemplate` struct. See
	// https://github.com/k3s-io/cluster-api-k3s/issues/62
	InfrastructureTemplate corev1.ObjectReference `json:"infrastructureTemplate"`

	// KThreesConfigSpec is a KThreesConfigSpec
	// to use for initializing and joining machines to the control plane.
	// +optional
	KThreesConfigSpec bootstrapv1beta1.KThreesConfigSpec `json:"kthreesConfigSpec,omitempty"`

	// UpgradeAfter is a field to indicate an upgrade should be performed
	// after the specified time even if no changes have been made to the
	// KThreesControlPlane
	// +optional
	UpgradeAfter *metav1.Time `json:"upgradeAfter,omitempty"`

	// 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"`

	// MachineTemplate contains information about how machines should be shaped
	// when creating or updating a control plane.
	MachineTemplate KThreesControlPlaneMachineTemplate `json:"machineTemplate,omitempty"`

	// The RemediationStrategy that controls how control plane machine remediation happens.
	// +optional
	RemediationStrategy *RemediationStrategy `json:"remediationStrategy,omitempty"`
}

KThreesControlPlaneSpec defines the desired state of KThreesControlPlane.

func (*KThreesControlPlaneSpec) DeepCopy

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

func (*KThreesControlPlaneSpec) DeepCopyInto

func (in *KThreesControlPlaneSpec) DeepCopyInto(out *KThreesControlPlaneSpec)

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

type KThreesControlPlaneStatus

type KThreesControlPlaneStatus 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"`

	// Total number of unavailable machines targeted by this control plane.
	// 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 k3s server is initialized.
	// +optional
	Initialized bool `json:"initialized"`

	// Ready denotes that the KThreesControlPlane 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.KThreesControlPlaneStatusError `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 KThreesControlPlane.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`

	// LastRemediation stores info about last remediation performed.
	// +optional
	LastRemediation *LastRemediationStatus `json:"lastRemediation,omitempty"`
}

KThreesControlPlaneStatus defines the observed state of KThreesControlPlane.

func (*KThreesControlPlaneStatus) DeepCopy

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

func (*KThreesControlPlaneStatus) DeepCopyInto

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

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.

Jump to

Keyboard shortcuts

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