Documentation ¶
Index ¶
- Variables
- func CheckAPIServerAvailability(ctx context.Context, condition gardencorev1beta1.Condition, ...) gardencorev1beta1.Condition
- func CheckAPIService(apiService *apiregistrationv1.APIService) error
- func CheckBackupBucket(bb client.Object) error
- func CheckDaemonSet(daemonSet *appsv1.DaemonSet) error
- func CheckDeployment(deployment *appsv1.Deployment) error
- func CheckEtcd(etcd *druidv1alpha1.Etcd) error
- func CheckExtensionObject(o client.Object) error
- func CheckManagedResource(managedResource *resourcesv1alpha1.ManagedResource) error
- func CheckManagedSeed(managedSeed *seedmanagementv1alpha1.ManagedSeed) error
- func CheckNode(node *corev1.Node) error
- func CheckSeed(seed *gardencorev1beta1.Seed, identity *gardencorev1beta1.Gardener) error
- func CheckSeedForMigration(seed *gardencorev1beta1.Seed, identity *gardencorev1beta1.Gardener) error
- func CheckStatefulSet(statefulSet *appsv1.StatefulSet) error
- func CheckTunnelConnection(ctx context.Context, shootClient kubernetes.Interface, ...) (bool, error)
- func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
- func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodReadyConditionTrue(status corev1.PodStatus) bool
- type Func
Constants ¶
This section is empty.
Variables ¶
var Now = time.Now
Now determines the current time.
Functions ¶
func CheckAPIServerAvailability ¶
func CheckAPIServerAvailability(ctx context.Context, condition gardencorev1beta1.Condition, restClient rest.Interface, conditioner conditionerFunc, log logrus.FieldLogger) gardencorev1beta1.Condition
CheckAPIServerAvailability checks if the API server of a cluster is reachable and measure the response time.
func CheckAPIService ¶ added in v1.20.0
func CheckAPIService(apiService *apiregistrationv1.APIService) error
CheckAPIService checks whether the given APIService is healthy. An APIService is considered healthy if it has the `Available` condition and its status is `True`.
func CheckBackupBucket ¶
CheckBackupBucket checks if an backup bucket Object is healthy or not.
func CheckDaemonSet ¶
CheckDaemonSet checks whether the given DaemonSet is healthy. A DaemonSet is considered healthy if its controller observed its current revision and if its desired number of scheduled pods is equal to its updated number of scheduled pods.
func CheckDeployment ¶
func CheckDeployment(deployment *appsv1.Deployment) error
CheckDeployment checks whether the given Deployment is healthy. A deployment is considered healthy if the controller observed its current revision and if the number of updated replicas is equal to the number of replicas.
func CheckEtcd ¶ added in v1.2.0
func CheckEtcd(etcd *druidv1alpha1.Etcd) error
CheckEtcd checks whether the given Etcd is healthy. A Etcd is considered healthy if its ready field in status is true.
func CheckExtensionObject ¶
CheckExtensionObject checks if an extension Object is healthy or not. An extension object is healthy if * Its observed generation is up-to-date * No gardener.cloud/operation is set * No lastError is in the status * A last operation is state succeeded is present
func CheckManagedResource ¶ added in v1.13.0
func CheckManagedResource(managedResource *resourcesv1alpha1.ManagedResource) error
CheckManagedResource checks whether the given ManagedResource is healthy. A ManagedResource is considered healthy if its controller observed its current revision, and if the required conditions are healthy.
func CheckManagedSeed ¶ added in v1.18.0
func CheckManagedSeed(managedSeed *seedmanagementv1alpha1.ManagedSeed) error
CheckManagedSeed checks if the given ManagedSeed is up-to-date and if its Seed has been registered.
func CheckNode ¶
CheckNode checks whether the given Node is healthy. A node is considered healthy if it has a `corev1.NodeReady` condition and this condition reports `corev1.ConditionTrue`.
func CheckSeed ¶
func CheckSeed(seed *gardencorev1beta1.Seed, identity *gardencorev1beta1.Gardener) error
CheckSeed checks if the Seed is up-to-date and if its extensions have been successfully bootstrapped.
func CheckSeedForMigration ¶ added in v1.14.0
func CheckSeedForMigration(seed *gardencorev1beta1.Seed, identity *gardencorev1beta1.Gardener) error
CheckSeedForMigration checks if the Seed is up-to-date (comparing only the versions) and if its extensions have been successfully bootstrapped.
func CheckStatefulSet ¶
func CheckStatefulSet(statefulSet *appsv1.StatefulSet) error
CheckStatefulSet checks whether the given StatefulSet is healthy. A StatefulSet is considered healthy if its controller observed its current revision, it is not in an update (i.e. UpdateRevision is empty) and if its current replicas are equal to its desired replicas.
func CheckTunnelConnection ¶ added in v1.16.0
func CheckTunnelConnection(ctx context.Context, shootClient kubernetes.Interface, logger logrus.FieldLogger, tunnelName string) (bool, error)
CheckTunnelConnection checks if the tunnel connection between the control plane and the shoot networks is established.
func GetPodCondition ¶
func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodReadyCondition ¶
func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func IsPodReady ¶
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
Types ¶
type Func ¶ added in v1.11.0
Func is a type for a function that checks the health of a runtime.Object.
func And ¶ added in v1.11.0
And combines multiple health check funcs to a single func, checking all funcs sequentially and return the first error that occurs or nil if no error occurs.¬
func ExtensionOperationHasBeenUpdatedSince ¶ added in v1.11.0
ExtensionOperationHasBeenUpdatedSince returns a health check function that checks if an extension Object's last operation has been updated since `lastUpdateTime`.