utils

package
v0.0.0-...-0000b31 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientset

func CreateClientset(kubeconfig string) (*kubernetes.Clientset, error)

CreateClientset creates a new Clientset for the given kubeconfig.

func CreateIstioCARole

func CreateIstioCARole(clientset kubernetes.Interface, namespace string) error

CreateIstioCARole creates a role object named "istio-ca-role".

func CreateIstioCARoleBinding

func CreateIstioCARoleBinding(clientset kubernetes.Interface, namespace string) error

CreateIstioCARoleBinding binds role "istio-ca-role" to default service account.

func CreatePod

func CreatePod(clientset kubernetes.Interface, namespace string, image string, name string) (*v1.Pod, error)

CreatePod creates a pod object and returns a pointer pointing to this object on success.

func CreatePodWithCommand

func CreatePodWithCommand(clientset kubernetes.Interface, namespace string, image string, name string, command []string, args []string) (*v1.Pod, error)

CreatePodWithCommand creates a pod object with specific command and arguments and returns a pointer pointing to this object on success.

func CreateService

func CreateService(clientset kubernetes.Interface, namespace string, name string, port int32,
	serviceType v1.ServiceType, pod *v1.Pod) (*v1.Service, error)

CreateService creates a service object and returns a pointer pointing to this object on success.

func CreateTestNamespace

func CreateTestNamespace(clientset kubernetes.Interface, prefix string) (string, error)

CreateTestNamespace creates a namespace for test. Returns name of the namespace on success, and error if there is any.

func DeletePod

func DeletePod(clientset kubernetes.Interface, namespace string, name string) error

DeletePod deletes a pod.

func DeleteSecret

func DeleteSecret(clientset kubernetes.Interface, namespace string, name string) error

DeleteSecret deletes a secret.

func DeleteService

func DeleteService(clientset kubernetes.Interface, namespace string, name string) error

DeleteService deletes a service.

func DeleteTestNamespace

func DeleteTestNamespace(clientset kubernetes.Interface, namespace string) error

DeleteTestNamespace deletes a namespace for test.

func WaitForSecretExist

func WaitForSecretExist(clientset kubernetes.Interface, namespace string, secretName string,
	timeToWait time.Duration) (*v1.Secret, error)

WaitForSecretExist takes name of a secret and watches the secret. Returns the requested secret if it exists, or error on timeouts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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