Documentation ¶
Overview ¶
Package machine contains Cluster API controller for the TinkerbellMachine CR.
Index ¶
- Constants
- Variables
- type TinkerbellMachineReconciler
- func (r *TinkerbellMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TinkerbellMachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
- func (r *TinkerbellMachineReconciler) TinkerbellClusterToTinkerbellMachines(ctx context.Context) handler.MapFunc
- type WorkflowTemplate
Constants ¶
View Source
const ( // HardwareOwnerNameLabel is a label set by either CAPT controllers or Tinkerbell controller to indicate // that given hardware takes part of at least one workflow. HardwareOwnerNameLabel = "v1alpha1.tinkerbell.org/ownerName" // HardwareOwnerNamespaceLabel is a label set by either CAPT controllers or Tinkerbell controller to indicate // that given hardware takes part of at least one workflow. HardwareOwnerNamespaceLabel = "v1alpha1.tinkerbell.org/ownerNamespace" // HardwareProvisionedAnnotation signifies that the Hardware with this annotation has be provisioned by CAPT. HardwareProvisionedAnnotation = "v1alpha1.tinkerbell.org/provisioned" )
Variables ¶
View Source
var ( // ErrNoHardwareAvailable is the error returned when there is no hardware available for provisioning. ErrNoHardwareAvailable = fmt.Errorf("no hardware available") // ErrHardwareIsNil is the error returned when the given hardware resource is nil. ErrHardwareIsNil = fmt.Errorf("given Hardware object is nil") // ErrHardwareMissingInterfaces is the error returned when the referenced hardware does not have any // network interfaces defined. ErrHardwareMissingInterfaces = fmt.Errorf("hardware has no interfaces defined") // ErrHardwareFirstInterfaceNotDHCP is the error returned when the referenced hardware does not have it's // first network interface configured for DHCP. ErrHardwareFirstInterfaceNotDHCP = fmt.Errorf("hardware's first interface has no DHCP address defined") // ErrHardwareFirstInterfaceDHCPMissingIP is the error returned when the referenced hardware does not have a // DHCP IP address assigned for it's first interface. ErrHardwareFirstInterfaceDHCPMissingIP = fmt.Errorf("hardware's first interface has no DHCP IP address defined") // ErrHardwareMissingDiskConfiguration is returned when the referenced hardware is missing // disk configuration. ErrHardwareMissingDiskConfiguration = fmt.Errorf("disk configuration is required") )
View Source
var ( // ErrMachineVersionEmpty is the error returned when Version is not set on the parent Machine. ErrMachineVersionEmpty = fmt.Errorf("machine version is empty") // ErrConfigurationNil is the error returned when TinkerbellMachineReconciler or TinkerbellClusterReconciler is nil. ErrConfigurationNil = fmt.Errorf("configuration is nil") // ErrMissingClient is the error returned when TinkerbellMachineReconciler or TinkerbellClusterReconciler do // not have a Client configured. ErrMissingClient = fmt.Errorf("client is nil") // ErrMissingBootstrapDataSecretValueKey is the error returned when the Secret referenced for bootstrap data // is missing the value key. ErrMissingBootstrapDataSecretValueKey = fmt.Errorf("retrieving bootstrap data: secret value key is missing") // ErrBootstrapUserDataEmpty is the error returned when the referenced bootstrap data is empty. ErrBootstrapUserDataEmpty = fmt.Errorf("received bootstrap user data is empty") )
View Source
var ( // ErrMissingName is the error returned when the WorfklowTemplate Name is not specified. ErrMissingName = fmt.Errorf("name can't be empty") // ErrMissingImageURL is the error returned when the WorfklowTemplate ImageURL is not specified. ErrMissingImageURL = fmt.Errorf("imageURL can't be empty") )
Functions ¶
This section is empty.
Types ¶
type TinkerbellMachineReconciler ¶
TinkerbellMachineReconciler implements Reconciler interface by managing Tinkerbell machines.
func (*TinkerbellMachineReconciler) Reconcile ¶
func (r *TinkerbellMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile ensures that all Tinkerbell machines are aligned with a given spec.
func (*TinkerbellMachineReconciler) SetupWithManager ¶
func (r *TinkerbellMachineReconciler) SetupWithManager( ctx context.Context, mgr ctrl.Manager, options controller.Options, ) error
SetupWithManager configures reconciler with a given manager.
func (*TinkerbellMachineReconciler) TinkerbellClusterToTinkerbellMachines ¶
func (r *TinkerbellMachineReconciler) TinkerbellClusterToTinkerbellMachines(ctx context.Context) handler.MapFunc
TinkerbellClusterToTinkerbellMachines is a handler.ToRequestsFunc to be used to enqeue requests for reconciliation of TinkerbellMachines.
type WorkflowTemplate ¶
type WorkflowTemplate struct { Name string MetadataURL string ImageURL string DestDisk string DestPartition string DeviceTemplateName string }
WorkflowTemplate is a helper struct for rendering CAPT Template data.
func (*WorkflowTemplate) Render ¶
func (wt *WorkflowTemplate) Render() (string, error)
Render renders workflow template for a given machine including user-data.
Click to show internal directories.
Click to hide internal directories.