controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPreConditionFailed = errors.New("precondition check failed")

Functions

This section is empty.

Types

type CK8sControlPlaneReconciler

type CK8sControlPlaneReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme

	K8sdDialTimeout time.Duration
	// contains filtered or unexported fields
}

CK8sControlPlaneReconciler reconciles a CK8sControlPlane object.

func (*CK8sControlPlaneReconciler) ClusterToCK8sControlPlane

func (r *CK8sControlPlaneReconciler) ClusterToCK8sControlPlane(ctx context.Context, log *logr.Logger) handler.MapFunc

ClusterToCK8sControlPlane is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation for CK8sControlPlane based on updates to a Cluster.

func (*CK8sControlPlaneReconciler) Reconcile

func (*CK8sControlPlaneReconciler) SetupWithManager

func (r *CK8sControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, log *logr.Logger) error

type MachineReconciler

type MachineReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme

	K8sdDialTimeout time.Duration
	// contains filtered or unexported fields
}

MachineReconciler reconciles a Machine object.

func (*MachineReconciler) Reconcile

func (r *MachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*MachineReconciler) SetupWithManager

func (r *MachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, log *logr.Logger) error

type OrchestratedInPlaceUpgradeController added in v0.2.0

type OrchestratedInPlaceUpgradeController struct {
	client.Client
	Log logr.Logger
	// contains filtered or unexported fields
}

OrchestratedInPlaceUpgradeController reconciles a CK8sControlPlane object and manages the in-place upgrades.

func (*OrchestratedInPlaceUpgradeController) Reconcile added in v0.2.0

Reconcile handles the reconciliation of a CK8sControlPlane object.

func (*OrchestratedInPlaceUpgradeController) SetupWithManager added in v0.2.0

func (r *OrchestratedInPlaceUpgradeController) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type OrchestratedInPlaceUpgradeScope added in v0.2.0

type OrchestratedInPlaceUpgradeScope struct {
	// contains filtered or unexported fields
}

OrchestratedInPlaceUpgradeScope is a struct that holds the context of the upgrade process.

type RemediationData

type RemediationData 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 int `json:"retryCount"`
}

RemediationData struct is used to keep track of information stored in the RemediationInProgressAnnotation in KCP during remediation and then into the RemediationForAnnotation on the replacement machine once it is created.

func RemediationDataFromAnnotation

func RemediationDataFromAnnotation(value string) (*RemediationData, error)

RemediationDataFromAnnotation gets RemediationData from an annotation value.

func (*RemediationData) Marshal

func (r *RemediationData) Marshal() (string, error)

Marshal an RemediationData into an annotation value.

func (*RemediationData) ToStatus

ToStatus converts a RemediationData into a LastRemediationStatus struct.

Jump to

Keyboard shortcuts

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