kubectl

package
v1.6.0-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogFailedContainers

func LogFailedContainers(c clientset.Interface, ns string, logFunc func(ftm string, args ...interface{}))

LogFailedContainers runs `kubectl logs` on a failed containers.

func PodRunningReady

func PodRunningReady(p *v1.Pod) (bool, error)

PodRunningReady checks whether pod p's phase is running and it has a ready condition of status true. This function is copied from k8s.io/kubernetes/test/utils/conditions.go @v1.23.17

Types

type TestKubeconfig

type TestKubeconfig struct {
	CertDir     string
	Host        string
	KubeConfig  string
	KubeContext string
	KubectlPath string
	Namespace   string // Every test has at least one namespace unless creation is skipped
}

TestKubeconfig is a struct containing the needed attributes from TestContext and Framework(Namespace).

func NewTestKubeconfig

func NewTestKubeconfig(certdir, host, kubeconfig, kubecontext, kubectlpath, namespace string) *TestKubeconfig

NewTestKubeconfig returns a new Kubeconfig struct instance.

func (*TestKubeconfig) KubectlCmd

func (tk *TestKubeconfig) KubectlCmd(args ...string) *exec.Cmd

KubectlCmd runs the kubectl executable through the wrapper script.

Jump to

Keyboard shortcuts

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