Documentation ¶
Index ¶
- func CCMMigrationCompleted(cluster *kubermaticv1.Cluster) 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 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 UpdateClusterStatus(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func Validate(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) error
- type ClusterPatchFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CCMMigrationCompleted ¶
func CCMMigrationCompleted(cluster *kubermaticv1.Cluster) 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 by fetching the current Cluster object and patching its status.
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 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 ¶
func GetProviderList(p *kubermaticv1.Preset) []kubermaticv1.ProviderType
func GetProviderPreset ¶
func GetProviderPreset(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) *kubermaticv1.ProviderPreset
func HasProvider ¶
func HasProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) (bool, reflect.Value)
func IsClusterInitialized ¶
func IsClusterInitialized(cluster *kubermaticv1.Cluster, versions kubermatic.Versions) bool
func IsProviderEnabled ¶
func IsProviderEnabled(p *kubermaticv1.Preset, provider kubermaticv1.ProviderType) bool
func NeedCCMMigration ¶
func NeedCCMMigration(cluster *kubermaticv1.Cluster) bool
func OverrideProvider ¶
func OverrideProvider(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType, newPreset *kubermaticv1.Preset) *kubermaticv1.Preset
func RemoveProvider ¶
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 timestamps.
func SetProviderEnabled ¶
func SetProviderEnabled(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType, enabled bool)
func UpdateClusterStatus ¶ added in v2.20.0
func UpdateClusterStatus(ctx context.Context, client ctrlruntimeclient.Client, cluster *kubermaticv1.Cluster, patch ClusterPatchFunc) error
UpdateClusterStatus will attempt to patch the cluster status of the given cluster.
func Validate ¶
func Validate(p *kubermaticv1.Preset, providerType kubermaticv1.ProviderType) error
Types ¶
type ClusterPatchFunc ¶ added in v2.20.0
type ClusterPatchFunc func(cluster *kubermaticv1.Cluster)
Click to show internal directories.
Click to hide internal directories.