Documentation
¶
Index ¶
- Constants
- Variables
- type Controller
- func (c *Controller) ExecutionSpaceExistForCluster(clusterName string) (bool, error)
- func (c *Controller) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
- func (c *Controller) SetupWithManager(mgr controllerruntime.Manager) error
- func (c *Controller) Start(ctx context.Context) error
Constants ¶
View Source
const ( // ControllerName is the controller name that will be used when reporting events. ControllerName = "cluster-controller" // MonitorRetrySleepTime is the amount of time the cluster controller that should // sleep between retrying cluster health updates. MonitorRetrySleepTime = 20 * time.Millisecond // HealthUpdateRetry controls the number of retries of writing cluster health update. HealthUpdateRetry = 5 )
Variables ¶
View Source
var ( // UnreachableTaintTemplate is the taint for when a cluster becomes unreachable. UnreachableTaintTemplate = &corev1.Taint{ Key: clusterv1alpha1.TaintClusterUnreachable, Effect: corev1.TaintEffectNoExecute, } // NotReadyTaintTemplate is the taint for when a cluster is not ready for // executing resources. NotReadyTaintTemplate = &corev1.Taint{ Key: clusterv1alpha1.TaintClusterNotReady, Effect: corev1.TaintEffectNoExecute, } )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
client.Client // used to operate Cluster resources.
EventRecorder record.EventRecorder
// ClusterMonitorPeriod represents cluster-controller monitoring period, i.e. how often does
// cluster-controller check cluster health signal posted from cluster-status-controller.
// This value should be lower than ClusterMonitorGracePeriod.
ClusterMonitorPeriod time.Duration
// ClusterMonitorGracePeriod represents the grace period after last cluster health probe time.
// If it doesn't receive update for this amount of time, it will start posting
// "ClusterReady==ConditionUnknown".
ClusterMonitorGracePeriod time.Duration
// When cluster is just created, e.g. agent bootstrap or cluster join, we give a longer grace period.
ClusterStartupGracePeriod time.Duration
// FailoverEvictionTimeout represents the grace period for deleting scheduling result on failed clusters.
FailoverEvictionTimeout time.Duration
// contains filtered or unexported fields
}
Controller is to sync Cluster.
func (*Controller) ExecutionSpaceExistForCluster ¶ added in v0.10.0
func (c *Controller) ExecutionSpaceExistForCluster(clusterName string) (bool, error)
ExecutionSpaceExistForCluster determine whether the execution space exists in the cluster
func (*Controller) Reconcile ¶
func (c *Controller) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
Reconcile performs a full reconciliation for the object referred to by the Request. The Controller will requeue the Request to be processed again if an error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
func (*Controller) SetupWithManager ¶
func (c *Controller) SetupWithManager(mgr controllerruntime.Manager) error
SetupWithManager creates a controller and register to controller manager.
Click to show internal directories.
Click to hide internal directories.