Documentation
¶
Index ¶
- func KubeletCommand(kOp KubeletOpt, c clientset.Interface, pod *v1.Pod)
- func PodExec(pod *v1.Pod, bashExec string) (string, error)
- func PrivilegedTestPSPClusterRoleBinding(client clientset.Interface, namespace string, teardown bool, saNames []string)
- func RunInPodWithVolume(c clientset.Interface, ns, claimName, command string)
- func SIGDescribe(text string, body func()) bool
- func StartExternalProvisioner(c clientset.Interface, ns string, externalPluginName string) *v1.Pod
- func TestKubeletRestartsAndRestoresMount(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod)
- func TestVolumeUnmountsFromDeletedPod(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod)
- func TestVolumeUnmountsFromDeletedPodWithForceOption(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod, ...)
- func TestVolumeUnmountsFromForceDeletedPod(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod)
- func VerifyExecInPodFail(pod *v1.Pod, bashExec string, exitCode int)
- func VerifyExecInPodSucceed(pod *v1.Pod, bashExec string)
- type KubeletOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KubeletCommand ¶
func KubeletCommand(kOp KubeletOpt, c clientset.Interface, pod *v1.Pod)
KubeletCommand performs `start`, `restart`, or `stop` on the kubelet running on the node of the target pod and waits for the desired statues.. - First issues the command via `systemctl` - If `systemctl` returns stderr "command not found, issues the command via `service` - If `service` also returns stderr "command not found", the test is aborted. Allowed kubeletOps are `KStart`, `KStop`, and `KRestart`
func PodExec ¶
func PodExec(pod *v1.Pod, bashExec string) (string, error)
PodExec wraps RunKubectl to execute a bash cmd in target pod
func PrivilegedTestPSPClusterRoleBinding ¶ added in v1.10.9
func PrivilegedTestPSPClusterRoleBinding(client clientset.Interface,
namespace string,
teardown bool,
saNames []string)
func RunInPodWithVolume ¶
func RunInPodWithVolume(c clientset.Interface, ns, claimName, command string)
RunInPodWithVolume runs a command in a pod with given claim mounted to /mnt directory.
func SIGDescribe ¶
func SIGDescribe(text string, body func()) bool
func StartExternalProvisioner ¶ added in v1.12.0
func StartExternalProvisioner(c clientset.Interface, ns string, externalPluginName string) *v1.Pod
func TestKubeletRestartsAndRestoresMount ¶
func TestKubeletRestartsAndRestoresMount(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod)
TestKubeletRestartsAndRestoresMount tests that a volume mounted to a pod remains mounted after a kubelet restarts
func TestVolumeUnmountsFromDeletedPod ¶
func TestVolumeUnmountsFromDeletedPod(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod)
TestVolumeUnmountsFromDeletedPod tests that a volume unmounts if the client pod was deleted while the kubelet was down.
func TestVolumeUnmountsFromDeletedPodWithForceOption ¶
func TestVolumeUnmountsFromDeletedPodWithForceOption(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod, forceDelete bool, checkSubpath bool)
TestVolumeUnmountsFromDeletedPod tests that a volume unmounts if the client pod was deleted while the kubelet was down. forceDelete is true indicating whether the pod is forcefully deleted.
func TestVolumeUnmountsFromForceDeletedPod ¶
func TestVolumeUnmountsFromForceDeletedPod(c clientset.Interface, f *framework.Framework, clientPod *v1.Pod)
TestVolumeUnmountsFromFoceDeletedPod tests that a volume unmounts if the client pod was forcefully deleted while the kubelet was down.
func VerifyExecInPodFail ¶ added in v1.12.0
func VerifyExecInPodFail(pod *v1.Pod, bashExec string, exitCode int)
VerifyExecInPodFail verifies bash cmd in target pod fail with certain exit code
func VerifyExecInPodSucceed ¶ added in v1.12.0
func VerifyExecInPodSucceed(pod *v1.Pod, bashExec string)
VerifyExecInPodSucceed verifies bash cmd in target pod succeed
Types ¶
type KubeletOpt ¶
type KubeletOpt string
const (
NodeStateTimeout = 1 * time.Minute
KStart KubeletOpt = "start"
KStop KubeletOpt = "stop"
KRestart KubeletOpt = "restart"
)