Documentation ¶
Index ¶
Constants ¶
const (
RKE2ControlPlaneKind = "RKE2ControlPlane"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ETCDMachineSnapshotReconciler ¶
type ETCDMachineSnapshotReconciler struct { client.Client WatchFilterValue string Tracker *remote.ClusterCacheTracker Scheme *runtime.Scheme // contains filtered or unexported fields }
ETCDMachineSnapshotReconciler reconciles an EtcdMachineSnapshot object.
func (*ETCDMachineSnapshotReconciler) Reconcile ¶
func (r *ETCDMachineSnapshotReconciler) Reconcile(ctx context.Context, etcdMachineSnapshot *snapshotrestorev1.ETCDMachineSnapshot) (_ ctrl.Result, reterr error)
Reconcile reconciles the EtcdMachineSnapshot object.
func (*ETCDMachineSnapshotReconciler) SetupWithManager ¶
func (r *ETCDMachineSnapshotReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, _ controller.Options) error
SetupWithManager sets up the controller with the Manager.
type ETCDSnapshotRestoreReconciler ¶
ETCDSnapshotRestoreReconciler reconciles a ETCDSnapshotRestore object
func (*ETCDSnapshotRestoreReconciler) Reconcile ¶
func (r *ETCDSnapshotRestoreReconciler) Reconcile(ctx context.Context, restore *snapshotrestorev1.ETCDSnapshotRestore) (_ ctrl.Result, reterr error)
func (*ETCDSnapshotRestoreReconciler) SetupWithManager ¶
func (r *ETCDSnapshotRestoreReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the controller with the Manager.
type ETCDSnapshotSecretReconciler ¶
ETCDSnapshotSecretReconciler reconciles an EtcdMachineSnapshot object.
func (*ETCDSnapshotSecretReconciler) Reconcile ¶
func (r *ETCDSnapshotSecretReconciler) Reconcile(ctx context.Context, secret *corev1.Secret) (ctrl.Result, error)
Reconcile reconciles the EtcdMachineSnapshot object.
func (*ETCDSnapshotSecretReconciler) SetupWithManager ¶
func (r *ETCDSnapshotSecretReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, _ controller.Options) error
SetupWithManager sets up the controller with the Manager.
type EtcdSnapshotSyncReconciler ¶
type EtcdSnapshotSyncReconciler struct { client.Client WatchFilterValue string Tracker *remote.ClusterCacheTracker // contains filtered or unexported fields }
EtcdSnapshotSyncReconciler reconciles a EtcdSnapshotSync object.
func (*EtcdSnapshotSyncReconciler) SetupWithManager ¶
func (r *EtcdSnapshotSyncReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, _ controller.Options) error
type Instruction ¶
type Instruction struct { Name string `json:"name,omitempty"` Image string `json:"image,omitempty"` Env []string `json:"env,omitempty"` Args []string `json:"args,omitempty"` Command string `json:"command,omitempty"` SaveOutput bool `json:"saveOutput,omitempty"` }
Instructions is a one time operation, used to perform shell commands on the host
func ETCDRestore ¶
func ETCDRestore(snapshot *snapshotrestorev1.ETCDMachineSnapshotFile) Instruction
ETCDRestore performs restore form a snapshot path on the init node
func ManifestRemoval ¶
func ManifestRemoval() Instruction
ManifestRemoval cleans up old rke2 manifests on the machine
func RKE2KillAll ¶
func RKE2KillAll() Instruction
RKE2KillAll stops RKE2 server or agent on the node
func RemoveETCDData ¶
func RemoveETCDData() Instruction
RemoveETCDData removes etcd snapshot state form the machine
func RemoveServerURL ¶
func RemoveServerURL() Instruction
RemoveServerURL deletes previous server url from config, allowing nodes to register using new init machine
func SetServerURL ¶
func SetServerURL(serverIP string) Instruction
SetServerURL sets the init machine URL, used to register RKE2 agents
type Planner ¶
Planner is responsible for executing instructions on the underlying machine host in the specified order, and collecting output from executed steps.
func Plan ¶
func Plan(ctx context.Context, c client.Client, name string, machine *clusterv1.Machine, machines collections.Machines) *Planner
Plan is initializing Planner, used to perform instructions in a specific order and collect results
func (*Planner) Apply ¶
Apply performs invocation of the supplied set of instructions, and reurns the ongoing state of the command execution