status

package
v1.26.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package status contains all the function needed to interact properly with the resources status

Index

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 ...Transaction,
) 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 SetClusterReadyCondition added in v1.26.0

func SetClusterReadyCondition(cluster *apiv1.Cluster)

SetClusterReadyCondition updates the cluster's readiness condition according to the cluster phase

Types

type Transaction added in v1.26.0

type Transaction func(cluster *apiv1.Cluster)

Transaction is a function that modifies a cluster

func SetImage added in v1.26.0

func SetImage(image string) Transaction

SetImage is a transaction that sets the cluster image

func SetMajorVersionUpgradeFromImage

func SetMajorVersionUpgradeFromImage(image *string) Transaction

SetMajorVersionUpgradeFromImage is a transaction that sets the cluster as upgrading to a newer major version starting from the provided image

func SetPhase added in v1.26.0

func SetPhase(phase string, reason string) Transaction

SetPhase is a transaction that sets the cluster phase and reason

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL