kverify

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package kverify verifies a running kubernetes cluster is healthy

Package kverify verifies a running kubernetes cluster is healthy

Package kverify verifies a running kubernetes cluster is healthy

Package kverify verifies a running kubernetes cluster is healthy

Index

Constants

View Source
const (
	// APIServerWaitKey is the name used in the flags for k8s api server
	APIServerWaitKey = "apiserver"
	// SystemPodsWaitKey is the name used in the flags for pods in the kube system
	SystemPodsWaitKey = "system_pods"
	// DefaultSAWaitKey is the name used in the flags for default service account
	DefaultSAWaitKey = "default_sa"
)

Variables

View Source
var (
	// DefaultComponents is map of the the default components to wait for
	DefaultComponents = map[string]bool{APIServerWaitKey: true, SystemPodsWaitKey: true}
	// NoWaitComponents is map of componets to wait for if specified 'none' or 'false'
	NoComponents = map[string]bool{APIServerWaitKey: false, SystemPodsWaitKey: false, DefaultSAWaitKey: false}
	// AllComponents is map for waiting for all components.
	AllComponents = map[string]bool{APIServerWaitKey: true, SystemPodsWaitKey: true, DefaultSAWaitKey: true}
	// DefaultWaitList is list of all default components to wait for. only names to be used for start flags.
	DefaultWaitList = []string{APIServerWaitKey, SystemPodsWaitKey}
	// AllComponentsList list of all valid components keys to wait for. only names to be used used for start flags.
	AllComponentsList = []string{APIServerWaitKey, SystemPodsWaitKey, DefaultSAWaitKey}
)

vars related to the --wait flag

Functions

func APIServerStatus

func APIServerStatus(cr command.Runner, hostname string, port int) (state.State, error)

APIServerStatus returns apiserver status in libmachine style state.State

func APIServerVersionMatch added in v1.9.0

func APIServerVersionMatch(client *kubernetes.Clientset, expected string) error

APIServerVersionMatch checks if the server version matches the expected

func ExpectedComponentsRunning added in v1.9.0

func ExpectedComponentsRunning(cs *kubernetes.Clientset) error

ExpectedComponentsRunning returns whether or not all expected components are running

func KubeletStatus

func KubeletStatus(cr command.Runner) (state.State, error)

KubeletStatus checks the kubelet status

func ShouldWait added in v1.9.2

func ShouldWait(wcs map[string]bool) bool

ShouldWait will return true if the config says need to wait

func WaitForAPIServerProcess added in v1.9.0

func WaitForAPIServerProcess(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg config.ClusterConfig, cr command.Runner, start time.Time, timeout time.Duration) error

WaitForAPIServerProcess waits for api server to be healthy returns error if it doesn't

func WaitForDefaultSA added in v1.9.2

func WaitForDefaultSA(cs *kubernetes.Clientset, timeout time.Duration) error

WaitForDefaultSA waits for the default service account to be created.

func WaitForHealthyAPIServer added in v1.9.0

func WaitForHealthyAPIServer(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg config.ClusterConfig, cr command.Runner, client *kubernetes.Clientset, start time.Time, hostname string, port int, timeout time.Duration) error

WaitForHealthyAPIServer waits for api server status to be running

func WaitForSystemPods added in v1.9.0

func WaitForSystemPods(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg config.ClusterConfig, cr command.Runner, client *kubernetes.Clientset, start time.Time, timeout time.Duration) error

WaitForSystemPods verifies essential pods for running kurnetes is running

Types

This section is empty.

Jump to

Keyboard shortcuts

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