Documentation ¶
Index ¶
- Constants
- Variables
- func AddToManager(mgr manager.Manager) error
- func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
- func NewActuator(client client.Client, namespace string, syncPeriod time.Duration, ...) controller.Actuator
- func NewPredicate(nodeCache utils.ExpiringCache, logger logr.Logger) predicate.Predicate
- type AddOptions
- type Projection
Constants ¶
const ( // TaintKeyUnreachable is the taint key to determine whether a node is unreachable. TaintKeyUnreachable = "node.kubernetes.io/unreachable" // HostnameLabel is a label to determine the hostname of a node. HostnameLabel = "kubernetes.io/hostname" )
const ( // ControllerName is the name of the Azure node controller. ControllerName = "azurenode-controller" // ActuatorName is the name of the Azure service actuator. ActuatorName = "azurenode-actuator" // PredicateName is the name of the predicate of the Azure node controller. PredicateName = "azurenode-predicate" // VirtualMachinePredicateName is the name of the predicate of the Azure node controller for filtering virtualmachine events. VirtualMachinePredicateName = "azurenode-virtualmachine-predicate" // FinalizerName is the finalizer to put on node resources. FinalizerName = "azure.remedy.gardener.cloud/node" )
const ( // CacheTTL is the TTL for node cache entries. CacheTTL = 10 * time.Hour )
Variables ¶
var ( // DefaultAddOptions are the default AddOptions for AddToManager. DefaultAddOptions = AddOptions{ Config: config.AzureFailedVMRemedyConfiguration{ NodeSyncPeriod: metav1.Duration{Duration: 4 * time.Hour}, }, } // ObjectLabeler is used to label virtualmachine objects created by this controller. ObjectLabeler = remedycontroller.NewClusterObjectLabeler() )
Functions ¶
func AddToManager ¶
AddToManager adds a controller with the default AddOptions to the given manager.
func AddToManagerWithOptions ¶
func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
AddToManagerWithOptions adds a controller with the given AddOptions to the given manager.
func NewActuator ¶
func NewActuator(client client.Client, namespace string, syncPeriod time.Duration, logger logr.Logger) controller.Actuator
NewActuator creates a new Actuator.
func NewPredicate ¶ added in v0.9.0
NewPredicate creates a new predicate that filters only relevant node events, such as creating or deleting a node, updating the deletion timestamp of a node, or updating the ready condition or unreachable taint of a node.
Types ¶
type AddOptions ¶
type AddOptions struct { // Controller are the controller.Options. Controller controller.Options // Client is the Kubernetes client for the control cluster. Client client.Client // Namespace is the namespace for custom resources in the control cluster. Namespace string // Manager is the control cluster manager. Manager manager.Manager // Config is the configuration for the Azure failed virtual machine remedy. Config config.AzureFailedVMRemedyConfiguration }
AddOptions are options to apply when adding a controller to a manager.
type Projection ¶ added in v0.9.0
Projection captures only the essential properties of a node that is being cached. By using projections, we prevent the cache from getting too big for clusters with large number of nodes.
func NewProjection ¶ added in v0.9.0
func NewProjection(node *corev1.Node) *Projection
NewProjection creates a new Projection from the given node.