Documentation ¶
Index ¶
- Constants
- func CheckDaemonSet(daemonSet *appsv1.DaemonSet) error
- func CheckDeployment(deployment *appsv1.Deployment) error
- func CheckNode(node *corev1.Node) error
- func CheckStatefulSet(statefulSet *appsv1.StatefulSet) error
- func NewClientFromBytes(data []byte, opts client.Options) (client.Client, error)
- func NewClientFromFile(kubeconfigPath string, opts client.Options) (client.Client, error)
- func NewClientFromSecret(ctx context.Context, c client.Client, namespace, secretName string, ...) (client.Client, error)
- func NewClientFromSecretObject(secret *corev1.Secret, opts client.Options) (client.Client, error)
Constants ¶
const NodeOutOfDisk = "OutOfDisk"
NodeOutOfDisk is deprecated NodeConditionType. It is no longer reported by kubelet >= 1.13. See https://github.com/kubernetes/kubernetes/pull/70111. +deprecated
Variables ¶
This section is empty.
Functions ¶
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 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 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 NewClientFromBytes ¶
NewClientFromBytes creates a new client from kubeconfig.
func NewClientFromFile ¶
NewClientFromFile creates a new Client struct from a kubconfig file.
func NewClientFromSecret ¶
func NewClientFromSecret(ctx context.Context, c client.Client, namespace, secretName string, opts client.Options) (client.Client, error)
NewClientFromSecret creates a new Client struct for a given kubeconfig stored as a Secret in an existing Kubernetes cluster. This cluster will be accessed by the <k8sClient>. It will read the Secret <secretName> in <namespace>. The Secret must contain a field "kubeconfig" which will be used.
Types ¶
This section is empty.