Documentation ¶
Index ¶
- Constants
- Variables
- func BuildProviderIDToNodes(bmhuid string, m3muid string) string
- func Contains(list []string, strToSearch string) bool
- func Filter(list []string, strToFilter string) (newList []string)
- type ClientGetter
- type ClusterManager
- func (s *ClusterManager) ControlPlaneEndpoint() ([]capm3.APIEndpoint, error)
- func (s *ClusterManager) CountDescendants(ctx context.Context) (int, error)
- func (s *ClusterManager) Create(ctx context.Context) error
- func (s *ClusterManager) Delete() error
- func (s *ClusterManager) SetFinalizer()
- func (s *ClusterManager) UnsetFinalizer()
- func (s *ClusterManager) UpdateClusterStatus() error
- type ClusterManagerInterface
- type DataManager
- type DataManagerInterface
- type DataTemplateManager
- type DataTemplateManagerInterface
- type HasRequeueAfterError
- type MachineManager
- func (m *MachineManager) Associate(ctx context.Context) error
- func (m *MachineManager) AssociateM3Metadata(ctx context.Context) error
- func (m *MachineManager) Delete(ctx context.Context) error
- func (m *MachineManager) DeleteOwnerRef(refList []metav1.OwnerReference) ([]metav1.OwnerReference, error)
- func (m *MachineManager) DissociateM3Metadata(ctx context.Context) error
- func (m *MachineManager) FindOwnerRef(refList []metav1.OwnerReference) (int, error)
- func (m *MachineManager) GetBaremetalHostID(ctx context.Context) (*string, error)
- func (m *MachineManager) GetProviderIDAndBMHID() (string, *string)
- func (m *MachineManager) HasAnnotation() bool
- func (m *MachineManager) IsBootstrapReady() bool
- func (m *MachineManager) IsProvisioned() bool
- func (m *MachineManager) RemovePauseAnnotation(ctx context.Context) error
- func (m *MachineManager) SetConditionMetal3MachineToFalse(t capi.ConditionType, reason string, severity capi.ConditionSeverity, ...)
- func (m *MachineManager) SetConditionMetal3MachineToTrue(t capi.ConditionType)
- func (m *MachineManager) SetError(message string, reason capierrors.MachineStatusError)
- func (m *MachineManager) SetFinalizer()
- func (m *MachineManager) SetNodeProviderID(ctx context.Context, bmhID, providerID string, clientFactory ClientGetter) error
- func (m *MachineManager) SetOwnerRef(refList []metav1.OwnerReference, controller bool) ([]metav1.OwnerReference, error)
- func (m *MachineManager) SetPauseAnnotation(ctx context.Context) error
- func (m *MachineManager) SetProviderID(providerID string)
- func (m *MachineManager) UnsetFinalizer()
- func (m *MachineManager) Update(ctx context.Context) error
- func (m *MachineManager) WaitForM3Metadata(ctx context.Context) error
- type MachineManagerInterface
- type MachineTemplateManager
- type ManagerFactory
- func (f ManagerFactory) NewClusterManager(cluster *capi.Cluster, capm3Cluster *capm3.Metal3Cluster, ...) (ClusterManagerInterface, error)
- func (f ManagerFactory) NewDataManager(metadata *capm3.Metal3Data, metadataLog logr.Logger) (DataManagerInterface, error)
- func (f ManagerFactory) NewDataTemplateManager(metadata *capm3.Metal3DataTemplate, metadataLog logr.Logger) (DataTemplateManagerInterface, error)
- func (f ManagerFactory) NewMachineManager(capiCluster *capi.Cluster, capm3Cluster *capm3.Metal3Cluster, ...) (MachineManagerInterface, error)
- func (f ManagerFactory) NewMachineTemplateManager(capm3Template *capm3.Metal3MachineTemplate, ...) (TemplateManagerInterface, error)
- func (f ManagerFactory) NewRemediationManager(remediation *capm3.Metal3Remediation, metal3machine *capm3.Metal3Machine, ...) (RemediationManagerInterface, error)
- type ManagerFactoryInterface
- type NotFoundError
- type RemediationManager
- func (r *RemediationManager) GetCapiMachine(ctx context.Context) (*capi.Machine, error)
- func (r *RemediationManager) GetLastRemediatedTime() *metav1.Time
- func (r *RemediationManager) GetRemediationPhase() string
- func (r *RemediationManager) GetRemediationType() capm3.RemediationType
- func (r *RemediationManager) GetTimeout() *metav1.Duration
- func (r *RemediationManager) GetUnhealthyHost(ctx context.Context) (*bmh.BareMetalHost, *patch.Helper, error)
- func (r *RemediationManager) HasReachRetryLimit() bool
- func (r *RemediationManager) IncreaseRetryCount()
- func (r *RemediationManager) OnlineStatus(host *bmh.BareMetalHost) bool
- func (r *RemediationManager) RetryLimitIsSet() bool
- func (r *RemediationManager) SetFinalizer()
- func (r *RemediationManager) SetLastRemediationTime(remediationTime *metav1.Time)
- func (r *RemediationManager) SetOwnerRemediatedConditionNew(ctx context.Context) error
- func (r *RemediationManager) SetRebootAnnotation(ctx context.Context) error
- func (r *RemediationManager) SetRemediationPhase(phase string)
- func (r *RemediationManager) SetUnhealthyAnnotation(ctx context.Context) error
- func (r *RemediationManager) TimeToRemediate(timeout time.Duration) (bool, time.Duration)
- func (r *RemediationManager) UnsetFinalizer()
- type RemediationManagerInterface
- type RequeueAfterError
- type TemplateManagerInterface
Constants ¶
const ( // ProviderName is exported. ProviderName = "metal3" // HostAnnotation is the key for an annotation that should go on a Metal3Machine to // reference what BareMetalHost it corresponds to. HostAnnotation = "metal3.io/BareMetalHost" // PausedAnnotationKey is an annotation to be used for pausing a BMH. PausedAnnotationKey = "metal3.io/capm3" // ProviderIDPrefix is a prefix for ProviderID. ProviderIDPrefix = "metal3://" // ProviderLabelPrefix is a label prefix for ProviderID. ProviderLabelPrefix = "metal3.io/uuid" )
Variables ¶
var ( // Capm3FastTrack is the variable fetched from the CAPM3_FAST_TRACK environment variable. Capm3FastTrack = os.Getenv("CAPM3_FAST_TRACK") )
Functions ¶
func BuildProviderIDToNodes ¶ added in v1.1.0
BuildProviderIDToNodes generates providerID by combining bmhuid and m3muid.
Types ¶
type ClientGetter ¶
type ClientGetter func(ctx context.Context, c client.Client, cluster *capi.Cluster) (clientcorev1.CoreV1Interface, error)
ClientGetter prototype.
type ClusterManager ¶
type ClusterManager struct { Cluster *capi.Cluster Metal3Cluster *capm3.Metal3Cluster Log logr.Logger // contains filtered or unexported fields }
ClusterManager is responsible for performing metal3 cluster reconciliation.
func (*ClusterManager) ControlPlaneEndpoint ¶
func (s *ClusterManager) ControlPlaneEndpoint() ([]capm3.APIEndpoint, error)
ControlPlaneEndpoint returns cluster controlplane endpoint.
func (*ClusterManager) CountDescendants ¶
func (s *ClusterManager) CountDescendants(ctx context.Context) (int, error)
CountDescendants will return the number of descendants objects of the metal3Cluster.
func (*ClusterManager) Create ¶
func (s *ClusterManager) Create(ctx context.Context) error
Create creates a cluster manager for the cluster.
func (*ClusterManager) Delete ¶
func (s *ClusterManager) Delete() error
Delete function, no-op for now.
func (*ClusterManager) SetFinalizer ¶
func (s *ClusterManager) SetFinalizer()
SetFinalizer sets finalizer.
func (*ClusterManager) UnsetFinalizer ¶
func (s *ClusterManager) UnsetFinalizer()
UnsetFinalizer unsets finalizer.
func (*ClusterManager) UpdateClusterStatus ¶
func (s *ClusterManager) UpdateClusterStatus() error
UpdateClusterStatus updates a metal3Cluster object's status.
type ClusterManagerInterface ¶
type ClusterManagerInterface interface { Create(context.Context) error Delete() error UpdateClusterStatus() error SetFinalizer() UnsetFinalizer() CountDescendants(context.Context) (int, error) }
ClusterManagerInterface is an interface for a ClusterManager.
func NewClusterManager ¶
func NewClusterManager(client client.Client, cluster *capi.Cluster, metal3Cluster *capm3.Metal3Cluster, clusterLog logr.Logger) (ClusterManagerInterface, error)
NewClusterManager returns a new helper for managing a cluster with a given name.
type DataManager ¶ added in v0.4.0
type DataManager struct { Data *capm3.Metal3Data Log logr.Logger // contains filtered or unexported fields }
DataManager is responsible for performing machine reconciliation.
func NewDataManager ¶ added in v0.4.0
func NewDataManager(client client.Client, data *capm3.Metal3Data, dataLog logr.Logger) (*DataManager, error)
NewDataManager returns a new helper for managing a Metal3Data object.
func (*DataManager) Reconcile ¶ added in v0.4.0
func (m *DataManager) Reconcile(ctx context.Context) error
Reconcile handles Metal3Data events.
func (*DataManager) ReleaseLeases ¶ added in v0.4.0
func (m *DataManager) ReleaseLeases(ctx context.Context) error
ReleaseLeases releases addresses from pool.
func (*DataManager) SetFinalizer ¶ added in v0.4.0
func (m *DataManager) SetFinalizer()
SetFinalizer sets finalizer.
func (*DataManager) UnsetFinalizer ¶ added in v0.4.0
func (m *DataManager) UnsetFinalizer()
UnsetFinalizer unsets finalizer.
type DataManagerInterface ¶ added in v0.4.0
type DataManagerInterface interface { SetFinalizer() UnsetFinalizer() Reconcile(ctx context.Context) error ReleaseLeases(ctx context.Context) error }
DataManagerInterface is an interface for a DataManager.
type DataTemplateManager ¶ added in v0.4.0
type DataTemplateManager struct { DataTemplate *capm3.Metal3DataTemplate Log logr.Logger // contains filtered or unexported fields }
DataTemplateManager is responsible for performing machine reconciliation.
func NewDataTemplateManager ¶ added in v0.4.0
func NewDataTemplateManager(client client.Client, dataTemplate *capm3.Metal3DataTemplate, dataTemplateLog logr.Logger) (*DataTemplateManager, error)
NewDataTemplateManager returns a new helper for managing a dataTemplate object.
func (*DataTemplateManager) SetClusterOwnerRef ¶ added in v0.4.0
func (m *DataTemplateManager) SetClusterOwnerRef(cluster *capi.Cluster) error
SetClusterOwnerRef sets ownerRef.
func (*DataTemplateManager) SetFinalizer ¶ added in v0.4.0
func (m *DataTemplateManager) SetFinalizer()
SetFinalizer sets finalizer.
func (*DataTemplateManager) UnsetFinalizer ¶ added in v0.4.0
func (m *DataTemplateManager) UnsetFinalizer()
UnsetFinalizer unsets finalizer.
func (*DataTemplateManager) UpdateDatas ¶ added in v0.4.0
func (m *DataTemplateManager) UpdateDatas(ctx context.Context) (int, error)
UpdateDatas manages the claims and creates or deletes Metal3Data accordingly. It returns the number of current allocations.
type DataTemplateManagerInterface ¶ added in v0.4.0
type DataTemplateManagerInterface interface { SetFinalizer() UnsetFinalizer() SetClusterOwnerRef(*capi.Cluster) error UpdateDatas(context.Context) (int, error) }
DataTemplateManagerInterface is an interface for a DataTemplateManager.
type HasRequeueAfterError ¶
type HasRequeueAfterError interface { // GetRequeueAfter gets the duration to wait until the managed object is // requeued for further processing. GetRequeueAfter() time.Duration }
HasRequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.
type MachineManager ¶
type MachineManager struct { Cluster *capi.Cluster Metal3Cluster *capm3.Metal3Cluster MachineList *capi.MachineList Machine *capi.Machine Metal3Machine *capm3.Metal3Machine Metal3MachineTemplate *capm3.Metal3MachineTemplate MachineSet *capi.MachineSet MachineSetList *capi.MachineSetList Log logr.Logger // contains filtered or unexported fields }
MachineManager is responsible for performing machine reconciliation.
func NewMachineManager ¶
func NewMachineManager(client client.Client, cluster *capi.Cluster, metal3Cluster *capm3.Metal3Cluster, machine *capi.Machine, metal3machine *capm3.Metal3Machine, machineLog logr.Logger) (*MachineManager, error)
NewMachineManager returns a new helper for managing a machine.
func NewMachineSetManager ¶ added in v0.4.2
func NewMachineSetManager(client client.Client, machine *capi.Machine, machineSetList *capi.MachineSetList, machineLog logr.Logger) (*MachineManager, error)
NewMachineSetManager returns a new helper for managing a machineset.
func (*MachineManager) Associate ¶
func (m *MachineManager) Associate(ctx context.Context) error
Associate associates a machine and is invoked by the Machine Controller.
func (*MachineManager) AssociateM3Metadata ¶ added in v0.4.0
func (m *MachineManager) AssociateM3Metadata(ctx context.Context) error
AssociateM3Metadata fetches the Metal3DataTemplate object and sets the owner references.
func (*MachineManager) Delete ¶
func (m *MachineManager) Delete(ctx context.Context) error
Delete deletes a metal3 machine and is invoked by the Machine Controller.
func (*MachineManager) DeleteOwnerRef ¶
func (m *MachineManager) DeleteOwnerRef(refList []metav1.OwnerReference) ([]metav1.OwnerReference, error)
DeleteOwnerRef removes the ownerreference to this Metal3Machine.
func (*MachineManager) DissociateM3Metadata ¶ added in v0.4.0
func (m *MachineManager) DissociateM3Metadata(ctx context.Context) error
DissociateM3Metadata removes machine from OwnerReferences of meta3DataTemplate, on failure requeue.
func (*MachineManager) FindOwnerRef ¶
func (m *MachineManager) FindOwnerRef(refList []metav1.OwnerReference) (int, error)
FindOwnerRef checks if an ownerreference to this Metal3Machine exists and returns the index.
func (*MachineManager) GetBaremetalHostID ¶
func (m *MachineManager) GetBaremetalHostID(ctx context.Context) (*string, error)
GetBaremetalHostID return the provider identifier for this machine.
func (*MachineManager) GetProviderIDAndBMHID ¶ added in v0.3.2
func (m *MachineManager) GetProviderIDAndBMHID() (string, *string)
GetProviderIDAndBMHID returns providerID and bmhID.
func (*MachineManager) HasAnnotation ¶
func (m *MachineManager) HasAnnotation() bool
HasAnnotation makes sure the machine has an annotation that references a host.
func (*MachineManager) IsBootstrapReady ¶
func (m *MachineManager) IsBootstrapReady() bool
IsBootstrapReady checks if the machine is given Bootstrap data.
func (*MachineManager) IsProvisioned ¶
func (m *MachineManager) IsProvisioned() bool
IsProvisioned checks if the metal3machine is provisioned.
func (*MachineManager) RemovePauseAnnotation ¶ added in v0.4.0
func (m *MachineManager) RemovePauseAnnotation(ctx context.Context) error
RemovePauseAnnotation checks and/or Removes the pause annotations on associated bmh.
func (*MachineManager) SetConditionMetal3MachineToFalse ¶ added in v1.1.0
func (m *MachineManager) SetConditionMetal3MachineToFalse(t capi.ConditionType, reason string, severity capi.ConditionSeverity, messageFormat string, messageArgs ...interface{})
SetConditionMetal3MachineToFalse sets Metal3Machine condition status to False.
func (*MachineManager) SetConditionMetal3MachineToTrue ¶ added in v1.1.0
func (m *MachineManager) SetConditionMetal3MachineToTrue(t capi.ConditionType)
SetConditionMetal3MachineToTrue sets Metal3Machine condition status to True.
func (*MachineManager) SetError ¶ added in v0.4.0
func (m *MachineManager) SetError(message string, reason capierrors.MachineStatusError)
SetError sets the ErrorMessage and ErrorReason fields on the machine and logs the message. It assumes the reason is invalid configuration, since that is currently the only relevant MachineStatusError choice.
func (*MachineManager) SetFinalizer ¶
func (m *MachineManager) SetFinalizer()
SetFinalizer sets finalizer.
func (*MachineManager) SetNodeProviderID ¶
func (m *MachineManager) SetNodeProviderID(ctx context.Context, bmhID, providerID string, clientFactory ClientGetter) error
SetNodeProviderID sets the metal3 provider ID on the kubernetes node.
func (*MachineManager) SetOwnerRef ¶
func (m *MachineManager) SetOwnerRef(refList []metav1.OwnerReference, controller bool) ([]metav1.OwnerReference, error)
SetOwnerRef adds an ownerreference to this Metal3Machine.
func (*MachineManager) SetPauseAnnotation ¶ added in v0.4.0
func (m *MachineManager) SetPauseAnnotation(ctx context.Context) error
SetPauseAnnotation sets the pause annotations on associated bmh.
func (*MachineManager) SetProviderID ¶
func (m *MachineManager) SetProviderID(providerID string)
SetProviderID sets the metal3 provider ID on the Metal3Machine.
func (*MachineManager) UnsetFinalizer ¶
func (m *MachineManager) UnsetFinalizer()
UnsetFinalizer unsets finalizer.
func (*MachineManager) Update ¶
func (m *MachineManager) Update(ctx context.Context) error
Update updates a machine and is invoked by the Machine Controller.
func (*MachineManager) WaitForM3Metadata ¶ added in v0.4.0
func (m *MachineManager) WaitForM3Metadata(ctx context.Context) error
WaitForM3Metadata fetches the Metal3DataTemplate object and sets the owner references.
type MachineManagerInterface ¶
type MachineManagerInterface interface { SetFinalizer() UnsetFinalizer() IsProvisioned() bool IsBootstrapReady() bool GetBaremetalHostID(context.Context) (*string, error) Associate(context.Context) error Delete(context.Context) error Update(context.Context) error HasAnnotation() bool GetProviderIDAndBMHID() (string, *string) SetNodeProviderID(context.Context, string, string, ClientGetter) error SetProviderID(string) SetPauseAnnotation(context.Context) error RemovePauseAnnotation(context.Context) error DissociateM3Metadata(context.Context) error AssociateM3Metadata(context.Context) error SetError(string, capierrors.MachineStatusError) SetConditionMetal3MachineToFalse(capi.ConditionType, string, capi.ConditionSeverity, string, ...interface{}) SetConditionMetal3MachineToTrue(capi.ConditionType) }
MachineManagerInterface is an interface for a MachineManager.
type MachineTemplateManager ¶ added in v0.5.0
type MachineTemplateManager struct { Metal3MachineList *capm3.Metal3MachineList Metal3MachineTemplate *capm3.Metal3MachineTemplate Log logr.Logger // contains filtered or unexported fields }
MachineTemplateManager is responsible for performing metal3MachineTemplate reconciliation.
func NewMachineTemplateManager ¶ added in v0.5.0
func NewMachineTemplateManager(client client.Client, metal3MachineTemplate *capm3.Metal3MachineTemplate, metal3MachineList *capm3.Metal3MachineList, metal3MachineTemplateLog logr.Logger) (*MachineTemplateManager, error)
NewMachineTemplateManager returns a new helper for managing a metal3MachineTemplate.
func (*MachineTemplateManager) UpdateAutomatedCleaningMode ¶ added in v0.5.0
func (m *MachineTemplateManager) UpdateAutomatedCleaningMode(ctx context.Context) error
UpdateAutomatedCleaningMode synchronizes automatedCleaningMode field value between metal3MachineTemplate and all the metal3Machines cloned from this metal3MachineTemplate.
type ManagerFactory ¶
type ManagerFactory struct {
// contains filtered or unexported fields
}
ManagerFactory only contains a client.
func NewManagerFactory ¶
func NewManagerFactory(client client.Client) ManagerFactory
NewManagerFactory returns a new factory.
func (ManagerFactory) NewClusterManager ¶
func (f ManagerFactory) NewClusterManager(cluster *capi.Cluster, capm3Cluster *capm3.Metal3Cluster, clusterLog logr.Logger) (ClusterManagerInterface, error)
NewClusterManager creates a new ClusterManager.
func (ManagerFactory) NewDataManager ¶ added in v0.4.0
func (f ManagerFactory) NewDataManager(metadata *capm3.Metal3Data, metadataLog logr.Logger) (DataManagerInterface, error)
NewDataManager creates a new DataManager.
func (ManagerFactory) NewDataTemplateManager ¶ added in v0.4.0
func (f ManagerFactory) NewDataTemplateManager(metadata *capm3.Metal3DataTemplate, metadataLog logr.Logger) (DataTemplateManagerInterface, error)
NewDataTemplateManager creates a new DataTemplateManager.
func (ManagerFactory) NewMachineManager ¶
func (f ManagerFactory) NewMachineManager(capiCluster *capi.Cluster, capm3Cluster *capm3.Metal3Cluster, capiMachine *capi.Machine, capm3Machine *capm3.Metal3Machine, machineLog logr.Logger) (MachineManagerInterface, error)
NewMachineManager creates a new MachineManager.
func (ManagerFactory) NewMachineTemplateManager ¶ added in v0.5.0
func (f ManagerFactory) NewMachineTemplateManager(capm3Template *capm3.Metal3MachineTemplate, capm3MachineList *capm3.Metal3MachineList, metadataLog logr.Logger) (TemplateManagerInterface, error)
NewMachineTemplateManager creates a new Metal3MachineTemplateManager.
func (ManagerFactory) NewRemediationManager ¶ added in v0.5.2
func (f ManagerFactory) NewRemediationManager(remediation *capm3.Metal3Remediation, metal3machine *capm3.Metal3Machine, machine *capi.Machine, remediationLog logr.Logger) (RemediationManagerInterface, error)
NewRemediationManager creates a new RemediationManager.
type ManagerFactoryInterface ¶
type ManagerFactoryInterface interface { NewClusterManager(cluster *capi.Cluster, metal3Cluster *capm3.Metal3Cluster, clusterLog logr.Logger, ) (ClusterManagerInterface, error) NewMachineManager(*capi.Cluster, *capm3.Metal3Cluster, *capi.Machine, *capm3.Metal3Machine, logr.Logger, ) (MachineManagerInterface, error) NewDataTemplateManager(*capm3.Metal3DataTemplate, logr.Logger) ( DataTemplateManagerInterface, error, ) NewDataManager(*capm3.Metal3Data, logr.Logger) ( DataManagerInterface, error, ) NewMachineTemplateManager(capm3Template *capm3.Metal3MachineTemplate, capm3MachineList *capm3.Metal3MachineList, metadataLog logr.Logger, ) (TemplateManagerInterface, error) NewRemediationManager(*capm3.Metal3Remediation, *capm3.Metal3Machine, *capi.Machine, logr.Logger) ( RemediationManagerInterface, error, ) }
ManagerFactoryInterface is a collection of new managers.
type NotFoundError ¶ added in v0.3.1
type NotFoundError struct { }
NotFoundError represents that an object was not found.
func (*NotFoundError) Error ¶ added in v0.3.1
func (e *NotFoundError) Error() string
Error implements the error interface.
type RemediationManager ¶ added in v0.5.2
type RemediationManager struct { Client client.Client Metal3Remediation *capm3.Metal3Remediation Metal3Machine *capm3.Metal3Machine Machine *capi.Machine Log logr.Logger }
RemediationManager is responsible for performing remediation reconciliation.
func NewRemediationManager ¶ added in v0.5.2
func NewRemediationManager(client client.Client, metal3remediation *capm3.Metal3Remediation, metal3Machine *capm3.Metal3Machine, machine *capi.Machine, remediationLog logr.Logger) (*RemediationManager, error)
NewRemediationManager returns a new helper for managing a Metal3Remediation object.
func (*RemediationManager) GetCapiMachine ¶ added in v0.5.2
GetCapiMachine returns CAPI machine object owning the current resource.
func (*RemediationManager) GetLastRemediatedTime ¶ added in v0.5.2
func (r *RemediationManager) GetLastRemediatedTime() *metav1.Time
GetLastRemediatedTime returns last remediation time.
func (*RemediationManager) GetRemediationPhase ¶ added in v0.5.2
func (r *RemediationManager) GetRemediationPhase() string
GetRemediationPhase returns current status of the remediation.
func (*RemediationManager) GetRemediationType ¶ added in v0.5.2
func (r *RemediationManager) GetRemediationType() capm3.RemediationType
GetRemediationType return type of remediation strategy.
func (*RemediationManager) GetTimeout ¶ added in v0.5.2
func (r *RemediationManager) GetTimeout() *metav1.Duration
GetTimeout returns timeout duration from remediation request Spec.
func (*RemediationManager) GetUnhealthyHost ¶ added in v0.5.2
func (r *RemediationManager) GetUnhealthyHost(ctx context.Context) (*bmh.BareMetalHost, *patch.Helper, error)
GetUnhealthyHost gets the associated host for unhealthy machine. Returns nil if not found. Assumes the host is in the same namespace as the unhealthy machine.
func (*RemediationManager) HasReachRetryLimit ¶ added in v0.5.2
func (r *RemediationManager) HasReachRetryLimit() bool
HasReachRetryLimit returns true if retryLimit is reached.
func (*RemediationManager) IncreaseRetryCount ¶ added in v0.5.2
func (r *RemediationManager) IncreaseRetryCount()
IncreaseRetryCount increases the retry count on Status.
func (*RemediationManager) OnlineStatus ¶ added in v0.5.2
func (r *RemediationManager) OnlineStatus(host *bmh.BareMetalHost) bool
OnlineStatus returns hosts Online field value.
func (*RemediationManager) RetryLimitIsSet ¶ added in v0.5.2
func (r *RemediationManager) RetryLimitIsSet() bool
RetryLimitIsSet returns true if retryLimit is set, false if not.
func (*RemediationManager) SetFinalizer ¶ added in v0.5.2
func (r *RemediationManager) SetFinalizer()
SetFinalizer sets finalizer.
func (*RemediationManager) SetLastRemediationTime ¶ added in v0.5.2
func (r *RemediationManager) SetLastRemediationTime(remediationTime *metav1.Time)
SetLastRemediationTime setting last remediation timestamp on Status.
func (*RemediationManager) SetOwnerRemediatedConditionNew ¶ added in v0.5.2
func (r *RemediationManager) SetOwnerRemediatedConditionNew(ctx context.Context) error
SetOwnerRemediatedConditionNew sets MachineOwnerRemediatedCondition on CAPI machine object that have failed a healthcheck.
func (*RemediationManager) SetRebootAnnotation ¶ added in v0.5.2
func (r *RemediationManager) SetRebootAnnotation(ctx context.Context) error
SetRebootAnnotation sets reboot annotation on unhealthy host.
func (*RemediationManager) SetRemediationPhase ¶ added in v0.5.2
func (r *RemediationManager) SetRemediationPhase(phase string)
SetRemediationPhase setting the state of the remediation.
func (*RemediationManager) SetUnhealthyAnnotation ¶ added in v0.5.2
func (r *RemediationManager) SetUnhealthyAnnotation(ctx context.Context) error
SetUnhealthyAnnotation sets capm3.UnhealthyAnnotation on unhealthy host.
func (*RemediationManager) TimeToRemediate ¶ added in v0.5.2
TimeToRemediate checks if it is time to execute a next remediation step and returns seconds to next remediation time.
func (*RemediationManager) UnsetFinalizer ¶ added in v0.5.2
func (r *RemediationManager) UnsetFinalizer()
UnsetFinalizer unsets finalizer.
type RemediationManagerInterface ¶ added in v0.5.2
type RemediationManagerInterface interface { SetFinalizer() UnsetFinalizer() TimeToRemediate(timeout time.Duration) (bool, time.Duration) SetRebootAnnotation(ctx context.Context) error SetUnhealthyAnnotation(ctx context.Context) error GetUnhealthyHost(ctx context.Context) (*bmh.BareMetalHost, *patch.Helper, error) OnlineStatus(host *bmh.BareMetalHost) bool GetRemediationType() capm3.RemediationType RetryLimitIsSet() bool SetRemediationPhase(phase string) GetRemediationPhase() string GetLastRemediatedTime() *metav1.Time SetLastRemediationTime(remediationTime *metav1.Time) HasReachRetryLimit() bool GetTimeout() *metav1.Duration IncreaseRetryCount() SetOwnerRemediatedConditionNew(ctx context.Context) error GetCapiMachine(ctx context.Context) (*capi.Machine, error) }
RemediationManagerInterface is an interface for a RemediationManager.
type RequeueAfterError ¶
RequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.
func (*RequeueAfterError) Error ¶
func (e *RequeueAfterError) Error() string
Error implements the error interface.
func (*RequeueAfterError) GetRequeueAfter ¶
func (e *RequeueAfterError) GetRequeueAfter() time.Duration
GetRequeueAfter gets the duration to wait until the managed object is requeued for further processing.
type TemplateManagerInterface ¶ added in v0.5.0
TemplateManagerInterface is an interface for a TemplateManager.