Documentation ¶
Index ¶
- type CNIReconciler
- type IPValidator
- type Operation
- type Reconciler
- func (r *Reconciler) CheckControlPlaneReady(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) CleanupStatusAfterValidate(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) DetectOperation(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (Operation, error)
- func (r *Reconciler) GenerateSpec(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) Reconcile(ctx context.Context, log logr.Logger, cluster *anywherev1.Cluster) (controller.Result, error)
- func (r *Reconciler) ReconcileCNI(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ReconcileControlPlane(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ReconcileWorkers(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ValidateClusterSpec(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ValidateControlPlaneIP(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ValidateDatacenterConfig(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ValidateHardware(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- func (r *Reconciler) ValidateRufioMachines(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
- type RemoteClientRegistry
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNIReconciler ¶ added in v0.15.0
type CNIReconciler interface {
Reconcile(ctx context.Context, logger logr.Logger, client client.Client, spec *c.Spec) (controller.Result, error)
}
CNIReconciler is an interface for reconciling CNI in the Tinkerbell cluster reconciler.
type IPValidator ¶ added in v0.15.0
type IPValidator interface {
ValidateControlPlaneIP(ctx context.Context, log logr.Logger, spec *c.Spec) (controller.Result, error)
}
IPValidator is an interface that defines methods to validate the control plane IP.
type Operation ¶ added in v0.15.0
type Operation string
Operation indicates the desired change on a cluster.
const ( // NewClusterOperation indicates to create a new cluster. NewClusterOperation Operation = "NewCluster" // K8sVersionUpgradeOperation indicates to upgrade all nodes to a new Kubernetes version. K8sVersionUpgradeOperation Operation = "K8sVersionUpgrade" // NoChange indicates no change made to cluster during periodical sync. NoChange Operation = "NoChange" )
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler for Tinkerbell.
func New ¶
func New(client client.Client, cniReconciler CNIReconciler, remoteClientRegistry RemoteClientRegistry, ipValidator IPValidator) *Reconciler
New defines a new Tinkerbell reconciler.
func (*Reconciler) CheckControlPlaneReady ¶ added in v0.15.0
func (r *Reconciler) CheckControlPlaneReady(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
CheckControlPlaneReady checks whether the control plane for an eks-a cluster is ready or not. Requeues with the appropriate wait times whenever the cluster is not ready yet.
func (*Reconciler) CleanupStatusAfterValidate ¶ added in v0.15.0
func (r *Reconciler) CleanupStatusAfterValidate(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
CleanupStatusAfterValidate removes errors from the cluster status with the tinkerbellScope.
func (*Reconciler) DetectOperation ¶ added in v0.15.0
func (r *Reconciler) DetectOperation(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (Operation, error)
DetectOperation detects change type.
func (*Reconciler) GenerateSpec ¶ added in v0.15.0
func (r *Reconciler) GenerateSpec(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
GenerateSpec generates Tinkerbell control plane and workers spec.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, log logr.Logger, cluster *anywherev1.Cluster) (controller.Result, error)
Reconcile reconciles cluster to desired state.
func (*Reconciler) ReconcileCNI ¶
func (r *Reconciler) ReconcileCNI(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ReconcileCNI reconciles the CNI to the desired state.
func (*Reconciler) ReconcileControlPlane ¶
func (r *Reconciler) ReconcileControlPlane(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ReconcileControlPlane applies the control plane CAPI objects to the cluster.
func (*Reconciler) ReconcileWorkers ¶ added in v0.15.0
func (r *Reconciler) ReconcileWorkers(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ReconcileWorkers applies the worker CAPI objects to the cluster.
func (*Reconciler) ValidateClusterSpec ¶ added in v0.15.0
func (r *Reconciler) ValidateClusterSpec(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ValidateClusterSpec performs a set of assertions on a cluster spec.
func (*Reconciler) ValidateControlPlaneIP ¶ added in v0.15.0
func (r *Reconciler) ValidateControlPlaneIP(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ValidateControlPlaneIP passes the cluster spec from tinkerbellScope to the IP Validator.
func (*Reconciler) ValidateDatacenterConfig ¶ added in v0.15.0
func (r *Reconciler) ValidateDatacenterConfig(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ValidateDatacenterConfig updates the cluster status if the TinkerbellDatacenter status indicates that the spec is invalid.
func (*Reconciler) ValidateHardware ¶ added in v0.15.0
func (r *Reconciler) ValidateHardware(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ValidateHardware performs a set of validations on the tinkerbell hardware read from the cluster.
func (*Reconciler) ValidateRufioMachines ¶ added in v0.15.0
func (r *Reconciler) ValidateRufioMachines(ctx context.Context, log logr.Logger, tinkerbellScope *Scope) (controller.Result, error)
ValidateRufioMachines checks to ensure all the Rufio machines condition contactable is True.
type RemoteClientRegistry ¶ added in v0.15.0
type RemoteClientRegistry interface {
GetClient(ctx context.Context, cluster client.ObjectKey) (client.Client, error)
}
RemoteClientRegistry is an interface that defines methods for remote clients.
type Scope ¶ added in v0.15.0
type Scope struct { ClusterSpec *c.Spec ControlPlane *tinkerbell.ControlPlane Workers *tinkerbell.Workers }
Scope object for Tinkerbell reconciler.