util

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2016 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PolicyCachePollInterval = 100 * time.Millisecond
	PolicyCachePollTimeout  = 5 * time.Second
)

Variables

This section is empty.

Functions

func CleanupServiceAndPod

func CleanupServiceAndPod(pod *kapi.Pod, service *kapi.Service, ns string)

CleanupServiceAndPod removes the Service and the Pod

func CreateNamespace

func CreateNamespace(clusterAdminKubeConfig, name string) (err error)

CreateNamespace creates a namespace with the specified name using the provided kubeconfig DO NOT USE, use create project instead

func CreatePodFromImage

func CreatePodFromImage(stream *imageapi.ImageStream, tag, ns string) *kapi.Pod

CreatePodFromImage creates a Pod from the latest image available in the Image Stream

func CreateServiceForPod

func CreateServiceForPod(pod *kapi.Pod, ns string) *kapi.Service

CreateServiceForPod creates a service to serve the provided Pod

func DeleteAndWaitForNamespaceTermination added in v1.1.5

func DeleteAndWaitForNamespaceTermination(c *kclient.Client, name string) error

func GetBaseDir

func GetBaseDir() string

GetBaseDir returns the base directory used for test.

func GetClientForServiceAccount added in v1.0.7

func GetClientForServiceAccount(adminClient *kclient.Client, clientConfig restclient.Config, namespace, name string) (*client.Client, *kclient.Client, *restclient.Config, error)

func GetClientForUser

func GetClientForUser(clientConfig restclient.Config, username string) (*client.Client, *kclient.Client, *