Documentation ¶
Index ¶
- func CheckCVOReadiness(configClient configclient.ConfigV1Interface, logger *log.Logger) (bool, error)
- func CheckCerts(secretClient v1.CoreV1Interface, logger *log.Logger) (bool, error)
- func CheckHealthcheckJob(ctx context.Context, restconfig *rest.Config, logger *log.Logger) error
- func CheckMachinesObjectState(dynamicClient dynamic.Interface, logger *log.Logger) (bool, error)
- func CheckNodeHealth(nodeClient v1.CoreV1Interface, logger *log.Logger) (bool, error)
- func CheckOperatorReadiness(configClient configclient.ConfigV1Interface, logger *log.Logger) (bool, error)
- func CheckPodHealth(podClient v1.CoreV1Interface, logger *log.Logger, ns string, ...) (bool, error)
- func CheckReplicaCountForDaemonSets(dsClient appsv1.AppsV1Interface, logger *log.Logger) (bool, error)
- func CheckReplicaCountForReplicaSets(dsClient appsv1.AppsV1Interface, logger *log.Logger) (bool, error)
- func GetClusterVersionObject(configClient configclient.ConfigV1Interface) (*v1.ClusterVersion, error)
- func IsClusterPod(pod kubev1.Pod) bool
- func IsNotCompleted(pod kubev1.Pod) bool
- func IsNotControlledByJob(pod kubev1.Pod) bool
- func IsNotReadinessPod(pod kubev1.Pod) bool
- func IsNotRunning(pod kubev1.Pod) bool
- type PodErrorTracker
- type PodPredicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCVOReadiness ¶
func CheckCVOReadiness(configClient configclient.ConfigV1Interface, logger *log.Logger) (bool, error)
CheckCVOReadiness attempts to look at the state of the ClusterVersionOperator and returns true if things are healthy.
func CheckCerts ¶
CheckCerts will check for the presence of a cert issued by certman
func CheckHealthcheckJob ¶
CheckHealthcheckJob uses the `osd-cluster-ready` healthcheck job to determine cluster readiness. If the cluster is not ready, it will return an error.
func CheckMachinesObjectState ¶
CheckMachinesObjectState lists all openshift machines and validates that they are "Running"
func CheckNodeHealth ¶
CheckNodeHealth attempts to look at the state of all operator and returns true if things are healthy.
func CheckOperatorReadiness ¶
func CheckOperatorReadiness(configClient configclient.ConfigV1Interface, logger *log.Logger) (bool, error)
CheckOperatorReadiness attempts to look at the state of all operator and returns true if things are healthy.
func CheckPodHealth ¶
func CheckPodHealth(podClient v1.CoreV1Interface, logger *log.Logger, ns string, podPrefixes ...string) (bool, error)
CheckPodHealth attempts to look at the state of all pods and returns true if things are healthy.
func CheckReplicaCountForDaemonSets ¶
func CheckReplicaCountForDaemonSets(dsClient appsv1.AppsV1Interface, logger *log.Logger) (bool, error)
CheckReplicaCountForDaemonSets checks if all the daemonsets running on the cluster have expected replicas
func CheckReplicaCountForReplicaSets ¶
func CheckReplicaCountForReplicaSets(dsClient appsv1.AppsV1Interface, logger *log.Logger) (bool, error)
CheckReplicaCountForReplicaSets checks if all the replicasets running on the cluster have expected replicas
func GetClusterVersionObject ¶
func GetClusterVersionObject(configClient configclient.ConfigV1Interface) (*v1.ClusterVersion, error)
GetClusterVersionObject wlil get the cluster version object for the cluster.
func IsClusterPod ¶
func IsNotCompleted ¶
func IsNotControlledByJob ¶
func IsNotReadinessPod ¶
IsNotReadinessPod ignores the chicken/egg situation where we're running health checks from within an ephemeral osd-cluster-ready-* Pod. That Pod would otherwise fail the health check it is running because it's in Pending state.
func IsNotRunning ¶
Types ¶
type PodErrorTracker ¶
PodErrorTracker is the structure that keeps count of each pending pod's threshold
func (*PodErrorTracker) CheckPendingPods ¶
func (p *PodErrorTracker) CheckPendingPods(podlist []kubev1.Pod) error
CheckPendingPods checks each pod in the provided list for pending state and updates the PodErrorTracker accordingly. It returns nil if no pods were pending more than their maximum threshold, and errors if a pod ever exceeds its maximum pending threshold.
func (*PodErrorTracker) NewPodErrorTracker ¶
func (p *PodErrorTracker) NewPodErrorTracker(threshold int) *PodErrorTracker
NewPodErrorTracker initializes the PodErrorTracker structure with a given pending pod threshold and a new pod counter
type PodPredicate ¶
func IsOlderThan ¶
func IsOlderThan(d time.Duration) PodPredicate
func MatchesNames ¶
func MatchesNames(name ...string) PodPredicate
func MatchesNamespace ¶
func MatchesNamespace(ns string) PodPredicate