Documentation ¶
Index ¶
- func CCMMigrationCompleted(cluster *kubermaticv1.Cluster) bool
- func ClusterConditionHasStatus(c *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType, ...) bool
- func ClusterReconcileWrapper(ctx context.Context, client ctrlruntimeclient.Client, workerName string, ...) (*reconcile.Result, error)
- func ClusterReconciliationSuccessful(cluster *kubermaticv1.Cluster, versions kubermatic.Versions, ...) (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 GetProviderList(p *kubermaticv1.Preset) []kubermaticv1.ProviderType
- func GetProviderPreset(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) *kubermaticv1.ProviderPreset
- func HasProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) (bool, reflect.Value)
- func IsClusterInitialized(cluster *kubermaticv1.Cluster, versions kubermatic.Versions) bool
- func IsProviderEnabled(p *kubermaticv1.Preset, provider kubermaticv1.ProviderType) bool
- func NeedCCMMigration(cluster *kubermaticv1.Cluster) bool
- func OverrideProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType, ...) *kubermaticv1.Preset
- func RemoveProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) *kubermaticv1.Preset
- func SetClusterCondition(c *kubermaticv1.Cluster, v kubermatic.Versions, ...)
- func SetProviderEnabled(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType, enabled bool)
- func Validate(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CCMMigrationCompleted ¶ added in v2.18.0
func CCMMigrationCompleted(cluster *kubermaticv1.Cluster) bool
func ClusterConditionHasStatus ¶ added in v2.17.0
func ClusterConditionHasStatus(c *kubermaticv1.Cluster, conditionType kubermaticv1.ClusterConditionType, status corev1.ConditionStatus) bool
func ClusterReconcileWrapper ¶
func ClusterReconcileWrapper( ctx context.Context, client ctrlruntimeclient.Client, workerName string, cluster *kubermaticv1.Cluster, versions kubermatic.Versions, 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, versions kubermatic.Versions, ignoreKubermaticVersion bool) (missingConditions []kubermaticv1.ClusterConditionType, success bool)
ClusterReconciliationSuccessful checks if cluster has all conditions that are required for it to be healthy. ignoreKubermaticVersion should only be set in tests.
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, versions kubermatic.Versions) kubermaticv1.HealthStatus
We assume that the cluster is still provisioning if it was not initialized fully at least once.
func GetProviderList ¶ added in v2.19.0
func GetProviderList(p *kubermaticv1.Preset) []kubermaticv1.ProviderType
func GetProviderPreset ¶ added in v2.19.0
func GetProviderPreset(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) *kubermaticv1.ProviderPreset
func HasProvider ¶ added in v2.19.0
func HasProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) (bool, reflect.Value)
func IsClusterInitialized ¶
func IsClusterInitialized(cluster *kubermaticv1.Cluster, versions kubermatic.Versions) bool
func IsProviderEnabled ¶ added in v2.19.0
func IsProviderEnabled(p *kubermaticv1.Preset, provider kubermaticv1.ProviderType) bool
func NeedCCMMigration ¶ added in v2.18.0
func NeedCCMMigration(cluster *kubermaticv1.Cluster) bool
func OverrideProvider ¶ added in v2.19.0
func OverrideProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType, newPreset *kubermaticv1.Preset) *kubermaticv1.Preset
func RemoveProvider ¶ added in v2.19.0
func RemoveProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) *kubermaticv1.Preset
func SetClusterCondition ¶
func SetClusterCondition( c *kubermaticv1.Cluster, v kubermatic.Versions, 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.
func SetProviderEnabled ¶ added in v2.19.0
func SetProviderEnabled(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType, enabled bool)
func Validate ¶ added in v2.19.0
func Validate(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) error
Types ¶
This section is empty.