Documentation
¶
Overview ¶
Package controllers implements the Kubeadm controllers.
Index ¶
- Constants
- type InitLocker
- type OCNEConfigReconciler
- func (r *OCNEConfigReconciler) ClusterToOCNEConfigs(o client.Object) []ctrl.Request
- func (r *OCNEConfigReconciler) MachinePoolToBootstrapMapFunc(o client.Object) []ctrl.Request
- func (r *OCNEConfigReconciler) MachineToBootstrapMapFunc(o client.Object) []ctrl.Request
- func (r *OCNEConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, rerr error)
- func (r *OCNEConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
- type Scope
Constants ¶
const ( // OCNEConfigControllerName defines the controller used when creating clients. OCNEConfigControllerName = "ocneconfig-controller" // DefaultTokenTTL is the default TTL used for tokens. DefaultTokenTTL = 15 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitLocker ¶
type InitLocker interface { Lock(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) bool Unlock(ctx context.Context, cluster *clusterv1.Cluster) bool }
InitLocker is a lock that is used around ocne init.
type OCNEConfigReconciler ¶
type OCNEConfigReconciler struct { Client client.Client KubeadmInitLock InitLocker // WatchFilterValue is the label value used to filter events prior to reconciliation. WatchFilterValue string // TokenTTL is the amount of time a bootstrap token (and therefore a OCNEConfig) will be valid. TokenTTL time.Duration // contains filtered or unexported fields }
OCNEConfigReconciler reconciles a OCNEConfig object.
func (*OCNEConfigReconciler) ClusterToOCNEConfigs ¶
func (r *OCNEConfigReconciler) ClusterToOCNEConfigs(o client.Object) []ctrl.Request
ClusterToOCNEConfigs is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation of KubeadmConfigs.
func (*OCNEConfigReconciler) MachinePoolToBootstrapMapFunc ¶
func (r *OCNEConfigReconciler) MachinePoolToBootstrapMapFunc(o client.Object) []ctrl.Request
MachinePoolToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue request for reconciliation of OCNEConfig.
func (*OCNEConfigReconciler) MachineToBootstrapMapFunc ¶
func (r *OCNEConfigReconciler) MachineToBootstrapMapFunc(o client.Object) []ctrl.Request
MachineToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue request for reconciliation of OCNEConfig.
func (*OCNEConfigReconciler) Reconcile ¶
func (r *OCNEConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, rerr error)
Reconcile handles OCNEConfig events.
func (*OCNEConfigReconciler) SetupWithManager ¶
func (r *OCNEConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the reconciler with the Manager.
type Scope ¶
type Scope struct { logr.Logger Config *bootstrapv1.OCNEConfig ConfigOwner *bsutil.ConfigOwner Cluster *clusterv1.Cluster }
Scope is a scoped struct used during reconciliation.