Documentation
¶
Index ¶
- func BoolPtr(b bool) *bool
- func DeleteDeploymentsWithPrefix(ctx context.Context, clients config.Clients, namespace string, ...) error
- func DeleteNamespace(ctx context.Context, clients config.Clients, namespace string) error
- func DeleteNetPolsInNamespace(ctx context.Context, clients config.Clients, namespace string) error
- func DeletePodsWithLabel(ctx context.Context, clients config.Clients, namespace string, label string) error
- func DeleteServicesWithPrefix(ctx context.Context, clients config.Clients, namespace string, ...) error
- func ExecCommandInPod(ctx context.Context, pod *corev1.Pod, command string, timeout int) (string, string, error)
- func GetOrCreateCM(ctx context.Context, clients config.Clients, cm corev1.ConfigMap) (corev1.ConfigMap, error)
- func GetOrCreateDS(ctx context.Context, clients config.Clients, ds appsv1.DaemonSet) (appsv1.DaemonSet, error)
- func GetOrCreateDeployment(ctx context.Context, clients config.Clients, deployment appsv1.Deployment) (appsv1.Deployment, error)
- func GetOrCreateNS(ctx context.Context, clients config.Clients, namespace string) (*corev1.Namespace, error)
- func GetOrCreatePod(ctx context.Context, clients config.Clients, pod corev1.Pod) (corev1.Pod, error)
- func GetOrCreateSvc(ctx context.Context, clients config.Clients, svc corev1.Service) (corev1.Service, error)
- func GetPodLogs(ctx context.Context, clients config.Clients, podName string, namespace string) (string, error)
- func Int64Ptr(i int64) *int64
- func IsPodRunning(ctx context.Context, clients config.Clients, pod *corev1.Pod) (bool, error)
- func RandomString(length int) string
- func RetryinPod(ctx context.Context, clients config.Clients, pod *corev1.Pod, cmd string, ...) (string, string, error)
- func SanitizeString(s string) string
- func ScaleDeployment(ctx context.Context, clients config.Clients, deployment appsv1.Deployment, ...) error
- func Shellout(command string, retries int) (string, string, error)
- func WaitForDeployment(ctx context.Context, clients config.Clients, deployment appsv1.Deployment) error
- func WaitForTestPods(ctx context.Context, clients config.Clients, namespace string, label string) ([]corev1.Pod, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDeploymentsWithPrefix ¶ added in v0.3.0
func DeleteDeploymentsWithPrefix(ctx context.Context, clients config.Clients, namespace string, deploymentName string) error
DeleteDeploymentsWithPrefix deletes deployments, starting with a prefix
func DeleteNamespace ¶
DeleteNamespace deletes a namespace
func DeleteNetPolsInNamespace ¶ added in v0.3.0
DeleteNetPolsInNamespace deletes network policies in a namespace
func DeletePodsWithLabel ¶ added in v0.2.0
func DeletePodsWithLabel(ctx context.Context, clients config.Clients, namespace string, label string) error
DeletePodsWithLabel deletes pods with a particular label
func DeleteServicesWithPrefix ¶ added in v0.2.0
func DeleteServicesWithPrefix(ctx context.Context, clients config.Clients, namespace string, serviceNamePrefix string) error
DeleteServicesWithPrefix deletes services starting with a prefix
func ExecCommandInPod ¶
func ExecCommandInPod(ctx context.Context, pod *corev1.Pod, command string, timeout int) (string, string, error)
ExecCommandInPod executes a command in a pod
func GetOrCreateCM ¶
func GetOrCreateCM(ctx context.Context, clients config.Clients, cm corev1.ConfigMap) (corev1.ConfigMap, error)
GetOrCreateCM gets or creates a configMap if it does not exist
func GetOrCreateDS ¶
func GetOrCreateDS(ctx context.Context, clients config.Clients, ds appsv1.DaemonSet) (appsv1.DaemonSet, error)
GetOrCreateDS gets or creates a deployment if it does not exist
func GetOrCreateDeployment ¶
func GetOrCreateDeployment(ctx context.Context, clients config.Clients, deployment appsv1.Deployment) (appsv1.Deployment, error)
GetOrCreateDeployment gets or creates a deployment if it does not exist
func GetOrCreateNS ¶
func GetOrCreateNS(ctx context.Context, clients config.Clients, namespace string) (*corev1.Namespace, error)
GetOrCreateNS gets or creates a namespace if it does not exist
func GetOrCreatePod ¶
func GetOrCreatePod(ctx context.Context, clients config.Clients, pod corev1.Pod) (corev1.Pod, error)
GetOrCreatePod gets or creates a pod if it does not exist
func GetOrCreateSvc ¶
func GetOrCreateSvc(ctx context.Context, clients config.Clients, svc corev1.Service) (corev1.Service, error)
GetOrCreateSvc gets or creates a service if it does not exist
func GetPodLogs ¶ added in v0.3.0
func GetPodLogs(ctx context.Context, clients config.Clients, podName string, namespace string) (string, error)
GetPodLogs retrieves logs from a pod
func IsPodRunning ¶ added in v0.3.0
IsPodRunning checks if a pod is running
func RandomString ¶
RandomString generates a random string of length n
func RetryinPod ¶
func RetryinPod(ctx context.Context, clients config.Clients, pod *corev1.Pod, cmd string, timeout int) (string, string, error)
RetryinPod retries a command in a pod
func SanitizeString ¶
SanitizeString removes newlines, carriage returns, and periods from a string
func ScaleDeployment ¶
func ScaleDeployment(ctx context.Context, clients config.Clients, deployment appsv1.Deployment, size int32) error
ScaleDeployment scales a deployment
func Shellout ¶ added in v0.2.0
Shellout is a function that runs a command in a shell and returns the stdout and stderr
func WaitForDeployment ¶
func WaitForDeployment(ctx context.Context, clients config.Clients, deployment appsv1.Deployment) error
WaitForDeployment waits for a deployment to be ready
Types ¶
This section is empty.