Documentation
¶
Overview ¶
Package status contains all the function needed to interact properly with the resources status
Index ¶
- func PatchConditionsWithOptimisticLock(ctx context.Context, c client.Client, cluster *apiv1.Cluster, ...) error
- func PatchWithOptimisticLock(ctx context.Context, c client.Client, cluster *apiv1.Cluster, ...) error
- func SetClusterReadyConditionTX(cluster *apiv1.Cluster)
- func SetPhaseTX(phase string, reason string) func(cluster *apiv1.Cluster)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchConditionsWithOptimisticLock ¶ added in v1.23.6
func PatchConditionsWithOptimisticLock( ctx context.Context, c client.Client, cluster *apiv1.Cluster, conditions ...metav1.Condition, ) error
PatchConditionsWithOptimisticLock will update a particular condition in cluster status. This function may update the conditions in the passed cluster with the latest ones that were found from the API server. This function is needed because Kubernetes still doesn't support strategic merge for CRDs (see https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
func PatchWithOptimisticLock ¶ added in v1.23.6
func PatchWithOptimisticLock( ctx context.Context, c client.Client, cluster *apiv1.Cluster, txs ...func(cluster *apiv1.Cluster), ) error
PatchWithOptimisticLock updates the status of the cluster using the passed transaction functions (in the given order). Important: after successfully updating the status, this function refreshes it into the passed cluster
func SetClusterReadyConditionTX ¶ added in v1.24.3
SetClusterReadyConditionTX updates the cluster's readiness condition according to the cluster phase
Types ¶
This section is empty.