Documentation
¶
Index ¶
- Constants
- type RKE2ConfigReconciler
- func (r *RKE2ConfigReconciler) ClusterToRKE2Configs(ctx context.Context, o client.Object) []ctrl.Request
- func (r *RKE2ConfigReconciler) MachineToBootstrapMapFunc(_ context.Context, o client.Object) []ctrl.Request
- func (r *RKE2ConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, rerr error)
- func (r *RKE2ConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
- type RKE2InitLock
- type Scope
Constants ¶
const ( // DefaultManifestDirectory is the default directory to store kubernetes manifests that RKE2 will deploy automatically. DefaultManifestDirectory string = "/var/lib/rancher/rke2/server/manifests" // DefaultRequeueAfter is the default requeue time. DefaultRequeueAfter time.Duration = 20 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RKE2ConfigReconciler ¶
type RKE2ConfigReconciler struct { RKE2InitLock RKE2InitLock client.Client Scheme *runtime.Scheme }
RKE2ConfigReconciler reconciles a Rke2Config object.
func (*RKE2ConfigReconciler) ClusterToRKE2Configs ¶ added in v0.5.0
func (r *RKE2ConfigReconciler) ClusterToRKE2Configs(ctx context.Context, o client.Object) []ctrl.Request
ClusterToRKE2Configs is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation of RKE2Configs.
func (*RKE2ConfigReconciler) MachineToBootstrapMapFunc ¶ added in v0.5.0
func (r *RKE2ConfigReconciler) MachineToBootstrapMapFunc(_ context.Context, o client.Object) []ctrl.Request
MachineToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue request for reconciliation of RKE2Config.
func (*RKE2ConfigReconciler) Reconcile ¶
func (r *RKE2ConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, rerr error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*RKE2ConfigReconciler) SetupWithManager ¶
func (r *RKE2ConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RKE2InitLock ¶
type RKE2InitLock interface { Unlock(ctx context.Context, cluster *clusterv1.Cluster) bool Lock(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) bool }
RKE2InitLock is an interface for locking/unlocking Machine Creation as soon as an Init Process for the Control Plane has been started.
type Scope ¶
type Scope struct { Logger logr.Logger Config *bootstrapv1.RKE2Config Machine *clusterv1.Machine Cluster *clusterv1.Cluster HasControlPlaneOwner bool ControlPlane *controlplanev1.RKE2ControlPlane }
Scope is a scoped struct used during reconciliation.