ready

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: UPL-1.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright (c) 2022, 2023, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Copyright (c) 2021, 2023, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Copyright (c) 2021, 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificatesAreReady

func CertificatesAreReady(client clipkg.Client, log vzlog.VerrazzanoLogger, vz *vzapi.Verrazzano, certificates []types.NamespacedName) (ready bool, certsNotReady []types.NamespacedName)

CertificatesAreReady Checks the list of named objects to see if there are matching Cert-Manager Certificate objects, and checks if those are in a Ready state.

ctx A valid ComponentContext for the operation certificates A list of NamespacedNames; this should be names of expected Certificate objects

Returns true and an empty list of names if all certs are ready, false and a list of certificate names that are NOT in the ready state

func DaemonSetsAreReady

func DaemonSetsAreReady(log vzlog.VerrazzanoLogger, client client.Client, namespacedNames []types.NamespacedName, expectedNodes int32, prefix string) bool

DaemonSetsAreReady Check that the named daemonsets have the minimum number of specified nodes ready and available

func DaemonsetsAreAvailable

func DaemonsetsAreAvailable(client clipkg.Client, daemonsets []types.NamespacedName) error

DaemonsetsAreAvailable a list of daemonsets is available when the expected replicas is equal to the ready replicas

func DeploymentsAreAvailable

func DeploymentsAreAvailable(client clipkg.Client, deployments []types.NamespacedName) error

DeploymentsAreAvailable a list of deployments is available when the expected replicas is equal to the ready replicas

func DeploymentsAreAvailableBySelector

func DeploymentsAreAvailableBySelector(client clipkg.Client, selectors []clipkg.ListOption) error

func DeploymentsAreReady

func DeploymentsAreReady(log vzlog.VerrazzanoLogger, client clipkg.Client, namespacedNames []types.NamespacedName, expectedReplicas int32, prefix string) bool

DeploymentsAreReady check that the named deployments have the minimum number of specified replicas ready and available

func DeploymentsReadyBySelectors

func DeploymentsReadyBySelectors(log vzlog.VerrazzanoLogger, client clipkg.Client, expectedReplicas int32, prefix string, opts ...clipkg.ListOption) bool

func DoDeploymentsExist

func DoDeploymentsExist(log vzlog.VerrazzanoLogger, client clipkg.Client, namespacedNames []types.NamespacedName, _ int32, prefix string) bool

DoDeploymentsExist checks if all the named deployments exist

func DoStatefulSetsExist

func DoStatefulSetsExist(log vzlog.VerrazzanoLogger, client client.Client, namespacedNames []types.NamespacedName, _ int32, prefix string) bool

DoStatefulSetsExist checks if all the named statefulsets exist

func DoesDeploymentExist added in v1.6.0

func DoesDeploymentExist(client clipkg.Client, namespacedName types.NamespacedName) (bool, error)

DoesDeploymentsExist checks if the named deployment exists

func DoesStatefulsetExist added in v1.6.0

func DoesStatefulsetExist(client client.Client, namespacedName types.NamespacedName) (bool, error)

DoesStatefulsetExist checks if the named statefulset exists

func EnsurePodsAreReady

func EnsurePodsAreReady(log vzlog.VerrazzanoLogger, podsToCheck []corev1.Pod, expectedPods int32, prefix string) (int32, bool)

EnsurePodsAreReady makes sure pods using the latest workload revision are ready. A list of pods using the latest revision are passed to this function.

func GetPodsList

func GetPodsList(log vzlog.VerrazzanoLogger, client clipkg.Client, namespacedName types.NamespacedName, selector *metav1.LabelSelector) *corev1.PodList

GetPodsList retrieves a list of pods for a given namespace and labels selector

func IngressesPresent

func IngressesPresent(log vzlog.VerrazzanoLogger, client clipkg.Client, ingressNames []types.NamespacedName, prefix string) bool

IngressesPresent Check that the named ingresses are present in the cluster

func IsCertficateIsReady

func IsCertficateIsReady(log vzlog.VerrazzanoLogger, client clipkg.Client, name types.NamespacedName) (bool, error)

IsCertficateIsReady Checks if a Cert-Manager Certificate object with the specified NamespacedName can be found in the cluster, and if it is in a Ready state.

Returns - true/nil if a matching Certificate object is found and Ready - false/nil if a matching Certifiate object is found and not Ready - false/error if an unexpected error has occurred

func PodsReadyDeployment

func PodsReadyDeployment(log vzlog.VerrazzanoLogger, client clipkg.Client, namespacedName types.NamespacedName, selector *metav1.LabelSelector, expectedReplicas int32, prefix string) bool

PodsReadyDeployment checks for an expected number of pods to be using the latest replicaset revision and are running and ready

func StatefulSetsAreAvailable

func StatefulSetsAreAvailable(client clipkg.Client, statefulsets []types.NamespacedName) error

StatefulSetsAreAvailable a list of statefulsets is available when the expected replicas is equal to the ready replicas

func StatefulSetsAreAvailableBySelector

func StatefulSetsAreAvailableBySelector(client clipkg.Client, selectors []clipkg.ListOption) error

StatefulSetsAreAvailableBySelector returns an error if not all pods controlled by statefulsets selected by the selector are ready

func StatefulSetsAreReady

func StatefulSetsAreReady(log vzlog.VerrazzanoLogger, client client.Client, namespacedNames []types.NamespacedName, expectedReplicas int32, prefix string) bool

StatefulSetsAreReady Check that the named statefulsets have the minimum number of specified replicas ready and available

Types

type AvailabilityObjects

type AvailabilityObjects struct {
	StatefulsetNames    []types.NamespacedName
	DeploymentNames     []types.NamespacedName
	DeploymentSelectors []clipkg.ListOption
	DaemonsetNames      []types.NamespacedName
}

func (*AvailabilityObjects) IsAvailable

Jump to

Keyboard shortcuts

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