Documentation ¶
Index ¶
- Constants
- func APIServerVersionInfo(t *testing.T, clientset *kubernetes.Clientset)
- func AssertAllNodesReady(t *testing.T, clientset *kubernetes.Clientset, desiredNodeCount int)
- func AssertKindInAllNamespacesReady(t *testing.T, clientset *kubernetes.Clientset, objType string)
- func AssertKindListIsReady(t *testing.T, clientset *kubernetes.Clientset, list runtime.Object)
- func EnsureKubeconfigFails(t *testing.T, kubeconfig any)
- func IsDaemonSetReady(t *testing.T, clientset *kubernetes.Clientset, namespace, name string) (*appsv1.DaemonSet, bool)
- func IsDeploymentReady(t *testing.T, clientset *kubernetes.Clientset, deployment metav1.Object) (bool, runtime.Object)
- func IsKubeconfigValid(kubeconfig []byte) error
- func IsNodeReady(t *testing.T, clientset *kubernetes.Clientset, node *corev1.Node) (bool, *corev1.Node)
- func IsPodReady(t *testing.T, clientset *kubernetes.Clientset, pod metav1.Object) (bool, runtime.Object)
- func IsReplicaSetReady(t *testing.T, clientset *kubernetes.Clientset, replicaSet metav1.Object) (bool, runtime.Object)
- func PrintAndLog(s string, t *testing.T)
- func RunEKSSmokeTest(t *testing.T, resources []apitype.ResourceV3, kubeconfigs ...interface{})
- func ValidateDaemonSet(t *testing.T, kubeconfig interface{}, namespace, name string, ...) error
- func ValidateNodes(t *testing.T, kubeconfig any, validateFn func(*corev1.NodeList)) error
- type KubeAccess
Constants ¶
const MaxRetries = 20
MaxRetries is the maximum number of retries that a resource will be attempted to be fetched from the Kubernetes API Server.
const RetryInterval = 15
RetryInterval is the number of seconds to sleep in between requests to the Kubernetes API Server.
Variables ¶
This section is empty.
Functions ¶
func APIServerVersionInfo ¶
func APIServerVersionInfo(t *testing.T, clientset *kubernetes.Clientset)
APIServerVersionInfo prints out the API Server versions.
func AssertAllNodesReady ¶
func AssertAllNodesReady(t *testing.T, clientset *kubernetes.Clientset, desiredNodeCount int)
AssertAllNodesReady ensures that all Nodes are running & have a "Ready" status condition.
func AssertKindInAllNamespacesReady ¶
func AssertKindInAllNamespacesReady(t *testing.T, clientset *kubernetes.Clientset, objType string)
AssertKindInAllNamespacesReady ensures all Deployments have valid & ready status conditions.
func AssertKindListIsReady ¶
AssertKindListIsReady verifies that each item in a given resource list is marked as ready.
func EnsureKubeconfigFails ¶
EnsureKubeconfigFails ensures that the provided kubeconfig fails to authenticate.
func IsDaemonSetReady ¶
func IsDeploymentReady ¶
func IsDeploymentReady(t *testing.T, clientset *kubernetes.Clientset, deployment metav1.Object) (bool, runtime.Object)
IsDeploymentReady attempts to check if the Deployments's status conditions are ready.
func IsKubeconfigValid ¶
IsKubeconfigValid checks that the kubeconfig provided is valid and error-free.
func IsNodeReady ¶
func IsNodeReady(t *testing.T, clientset *kubernetes.Clientset, node *corev1.Node) (bool, *corev1.Node)
IsNodeReady attempts to check if the Node status condition is ready.
func IsPodReady ¶
func IsPodReady(t *testing.T, clientset *kubernetes.Clientset, pod metav1.Object) (bool, runtime.Object)
IsPodReady attempts to check if the Pod's status & condition is ready.
func IsReplicaSetReady ¶
func IsReplicaSetReady(t *testing.T, clientset *kubernetes.Clientset, replicaSet metav1.Object) (bool, runtime.Object)
IsReplicaSetReady attempts to check if the ReplicaSets's status conditions are ready.
func PrintAndLog ¶
PrintAndLog is a helper fucn that prints a string to stdout, and logs it to the testing logs.
func RunEKSSmokeTest ¶
func RunEKSSmokeTest(t *testing.T, resources []apitype.ResourceV3, kubeconfigs ...interface{})
RunEKSSmokeTest instantiates the EKS Smoke Test.
func ValidateDaemonSet ¶
Types ¶
type KubeAccess ¶
type KubeAccess struct { RESTConfig *restclient.Config Clientset *kubernetes.Clientset }
KubeAccess holds the Kubernetes client-go client bag of tools to work with the APIServer: the RESTConfig, and Clientset for the various API groups.
func KubeconfigToKubeAccess ¶
func KubeconfigToKubeAccess(kubeconfig []byte) (*KubeAccess, error)
KubeconfigToKubeAccess creates a KubeAccess object from a serialized kubeconfig.