Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func AddToManager(mgr manager.Manager, r *hibernationReconciler, concurrentReconciles int, ...) error
- func NewReconciler(mgr manager.Manager, rateLimiter flowcontrol.RateLimiter) *hibernationReconciler
- func RegisterActuator(a HibernationActuator)
- type HibernationActuator
- type HibernationPreemptibleMachines
Constants ¶
View Source
const ( // ControllerName is the name of this controller ControllerName = hivev1.HibernationControllerName )
Variables ¶
This section is empty.
Functions ¶
func AddToManager ¶
func AddToManager(mgr manager.Manager, r *hibernationReconciler, concurrentReconciles int, rateLimiter workqueue.RateLimiter) error
AddToManager adds a new Controller to the controller manager
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, rateLimiter flowcontrol.RateLimiter) *hibernationReconciler
NewReconciler returns a new Reconciler
func RegisterActuator ¶
func RegisterActuator(a HibernationActuator)
RegisterActuator register an actuator with this controller. The actuator determines whether it can handle a particular cluster deployment via the CanHandle function.
Types ¶
type HibernationActuator ¶
type HibernationActuator interface { // CanHandle returns true if the actuator can handle a particular ClusterDeployment CanHandle(cd *hivev1.ClusterDeployment) bool // StopMachines will start machines belonging to the given ClusterDeployment StopMachines(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) error // StartMachines will select machines belonging to the given ClusterDeployment StartMachines(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) error // MachinesRunning will return true if the machines associated with the given // ClusterDeployment are in a running state. It also returns a list of machines that // are not running. MachinesRunning(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) (bool, []string, error) // MachinesStopped will return true if the machines associated with the given // ClusterDeployment are in a stopped state. it also returns a list of machines // that have not stopped. MachinesStopped(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) (bool, []string, error) }
HibernationActuator is the interface that the hibernation controller uses to interact with cloud providers.
type HibernationPreemptibleMachines ¶ added in v1.1.10
type HibernationPreemptibleMachines interface { // ReplaceMachines uses the remote client to replace the preemptible machines // belonging to the given ClusterDeployment. Since it uses the remote client // it should only be called when the API is reachable. // replaced is true when at least one machine was replaced. ReplaceMachines(cd *hivev1.ClusterDeployment, remoteClient client.Client, logger log.FieldLogger) (replaced bool, err error) }
HibernationPreemptibleMachines is the interface that the hibernation controller for preemptible instances on cloud providers.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.