lib/containers/k8s.pm
install_k3s Deploy k3s using k3s-install script that is either pulled from upstream or distro
uninstall_k3s Uninstalls k3s
install_kubectl Installs kubectl from the respositories
install_helm Installs helm from our upstream or repositories
apply_manifest Apply a kubernetes manifest
find_pods Find pods using kubectl queries
wait_for_k8s_job_complete Wait until the job is complete
validate_pod_logs Validates that the logs contains a text
get_pod_name
Gets the full Pod name based on a Label and the Value of that Label.
e.g. get_pod_logs("component", "nginx")
We are getting the Pods by label instead of other methods as that makes it re-usable regardless of
Workload type, e.g. Deployments, StatefulSets, Jobs and etc.
get_pod_logs
get_pod_logs($pod_name)
e.g. get_pod_logs("postgrest-7f9d46ff77-87hj4")
Gets the logs from a Pod running on Kubernetes and uploads them to the OpenQA Job.
get_namespace_events
Gets the Events from the currently active Kubernetes Namespace and uploads them to the OpenQA Job.
gather_k8s_logs
gather_k8s_logs($label, @list_of_components)
Gets Events, general Pod status and specific Pod logs and uploads them to the OpenQA Job.