Documentation
¶
Index ¶
- Constants
- func AssertAllPodsRunning(g gomega.Gomega, kubeContext, namespace string)
- func AssertJsonpathEquals(g gomega.Gomega, ...)
- func AssertResourceExists(g gomega.Gomega, kubeContext, namespace, resource, name string)
- func Kubectl(kubeContext string, args ...string) (string, error)
- func KubectlGet(kubeContext, namespace, resource string, extraArgs ...string) (string, error)
- func KubectlGetJsonpath(kubeContext, namespace, resource, name, jsonpath string) (string, error)
- func KubectlLogs(kubeContext, namespace, labelSelector string, tail int) (string, error)
- type PodStatus
Constants ¶
const ( DefaultTimeout = 3 * time.Minute DefaultPolling = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func AssertAllPodsRunning ¶
AssertAllPodsRunning checks every non-completed pod in the namespace is Running. Designed for use inside Eventually(func(g Gomega) { ... }).
func AssertJsonpathEquals ¶
func AssertJsonpathEquals(g gomega.Gomega, kubeContext, namespace, resource, name, jsonpath, expected string)
AssertJsonpathEquals checks that a jsonpath value on a resource matches the expected string. Designed for use inside Eventually(func(g Gomega) { ... }).
func AssertResourceExists ¶
AssertResourceExists checks that a named resource exists in the namespace. Designed for use inside Eventually(func(g Gomega) { ... }).
func Kubectl ¶
Kubectl executes an arbitrary kubectl command with the given context. Returns trimmed combined output (stdout+stderr) and any error.
func KubectlGet ¶
KubectlGet runs: kubectl get <resource> -n <namespace> [extraArgs...]
func KubectlGetJsonpath ¶
KubectlGetJsonpath runs: kubectl get <resource> <name> -n <namespace> -o jsonpath=<expr>
Types ¶
type PodStatus ¶
PodStatus holds parsed pod information.
func GetPodStatuses ¶
GetPodStatuses returns the status of all non-completed pods in a namespace. Completed pods (Succeeded/Failed) are filtered out via field-selector so Job pods like the CA-extractor don't cause false failures.