Documentation ¶
Index ¶
- func ClusterReconcileWrapper(ctx context.Context, client ctrlruntimeclient.Client, workerName string, ...) (*reconcile.Result, error)
- func ClusterReconciliationSuccessful(cluster *kubermaticv1.Cluster) (missingConditions []kubermaticv1.ClusterConditionType, success bool)
- func GetClusterCondition(c *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType) (int, *kubermaticv1.ClusterCondition)
- func GetHealthStatus(status kubermaticv1.HealthStatus, cluster *kubermaticv1.Cluster) kubermaticv1.HealthStatus
- func IsClusterInitialized(cluster *kubermaticv1.Cluster) bool
- func SetClusterCondition(c *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterReconcileWrapper ¶
func ClusterReconcileWrapper( ctx context.Context, client ctrlruntimeclient.Client, workerName string, cluster *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType, reconcile func() (*reconcile.Result, error)) (*reconcile.Result, error)
ClusterReconcileWrapper is a wrapper that should be used around any cluster reconciliaton. It: * Checks if the cluster is paused * Checks if the worker-name matches * Sets the ReconcileSuccess condition for the controller
func ClusterReconciliationSuccessful ¶
func ClusterReconciliationSuccessful(cluster *kubermaticv1.Cluster) (missingConditions []kubermaticv1.ClusterConditionType, success bool)
func GetClusterCondition ¶
func GetClusterCondition(c *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType) (int, *kubermaticv1.ClusterCondition)
GetClusterCondition returns the index of the given condition or -1 and the condition itself or a nilpointer.
func GetHealthStatus ¶
func GetHealthStatus(status kubermaticv1.HealthStatus, cluster *kubermaticv1.Cluster) kubermaticv1.HealthStatus
We assume that te cluster is still provisioning if it was not initialized fully at least once.
func IsClusterInitialized ¶
func IsClusterInitialized(cluster *kubermaticv1.Cluster) bool
func SetClusterCondition ¶
func SetClusterCondition( c *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType, status corev1.ConditionStatus, reason string, message string, )
SetClusterCondition sets a condition on the given cluster using the provided type, status, reason and message. It also adds the Kubermatic version and tiemstamps.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.