controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 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 KThreesControlPlaneReconciler

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

	EtcdDialTimeout time.Duration
	EtcdCallTimeout time.Duration
	// contains filtered or unexported fields
}

KThreesControlPlaneReconciler reconciles a KThreesControlPlane object.

func (*KThreesControlPlaneReconciler) ClusterToKThreesControlPlane

func (r *KThreesControlPlaneReconciler) ClusterToKThreesControlPlane(ctx context.Context, log *logr.Logger) handler.MapFunc

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

func (*KThreesControlPlaneReconciler) Reconcile

func (*KThreesControlPlaneReconciler) SetupWithManager

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

type MachineReconciler

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

	EtcdDialTimeout time.Duration
	EtcdCallTimeout time.Duration
	// contains filtered or unexported fields
}

KThreesControlPlaneReconciler reconciles a KThreesControlPlane object.

func (*MachineReconciler) Reconcile

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

+kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch;create;update;patch;delete

func (*MachineReconciler) SetupWithManager

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

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