Documentation ¶
Index ¶
- Constants
- func AddAdditionalAllowedRegistries(hostPortGlobs ...string)
- func CreateNamespace(clusterAdminKubeConfig, name string) (err error)
- func DeleteAndWaitForNamespaceTermination(c kclientset.Interface, name string) error
- func GetAdditionalAllowedRegistries() sets.String
- func GetBaseDir() string
- func GetClientForServiceAccount(adminClient kclientset.Interface, clientConfig restclient.Config, ...) (*kclientset.Clientset, *restclient.Config, error)
- func GetClientForUser(clusterAdminConfig *restclient.Config, username string) (kclientset.Interface, *restclient.Config, error)
- func GetClusterAdminClientConfig(adminKubeConfigFile string) (*restclient.Config, error)
- func GetClusterAdminClientConfigOrDie(adminKubeConfigFile string) *restclient.Config
- func GetClusterAdminKubeClient(adminKubeConfigFile string) (kclientset.Interface, error)
- func GetImageFixture(filename string) (*imageapi.Image, error)
- func GetScopedClientForUser(clusterAdminClientConfig *restclient.Config, username string, scopes []string) (kclientset.Interface, *restclient.Config, error)
- func GetTemplateFixture(filename string) (*templateapi.Template, error)
- func KubeConfigPath() string
- func Namespace() string
- func NewDockerClient() (*dockerClient.Client, error)
- func NewTestLDAPServer() *testLDAPServer
- func RandomNamespace(prefix string) string
- func RequireDocker()
- func SetAdditionalAllowedRegistries(hostPortGlobs ...string)
- func WaitForClusterPolicyUpdate(c authorizationtypedclient.SelfSubjectAccessReviewsGetter, verb string, ...) error
- func WaitForPolicyUpdate(c authorizationtypedclient.SelfSubjectAccessReviewsGetter, ...) error
- func WaitForResourceQuotaLimitSync(client kcoreclient.ResourceQuotaInterface, name string, ...) error
Constants ¶
const ( PolicyCachePollInterval = 100 * time.Millisecond PolicyCachePollTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func AddAdditionalAllowedRegistries ¶
func AddAdditionalAllowedRegistries(hostPortGlobs ...string)
func CreateNamespace ¶
CreateNamespace creates a namespace with the specified name using the provided kubeconfig DO NOT USE, use create project instead
func DeleteAndWaitForNamespaceTermination ¶
func DeleteAndWaitForNamespaceTermination(c kclientset.Interface, name string) error
func GetClientForServiceAccount ¶
func GetClientForServiceAccount(adminClient kclientset.Interface, clientConfig restclient.Config, namespace, name string) (*kclientset.Clientset, *restclient.Config, error)
func GetClientForUser ¶
func GetClientForUser(clusterAdminConfig *restclient.Config, username string) (kclientset.Interface, *restclient.Config, error)
func GetClusterAdminClientConfig ¶
func GetClusterAdminClientConfig(adminKubeConfigFile string) (*restclient.Config, error)
func GetClusterAdminClientConfigOrDie ¶
func GetClusterAdminClientConfigOrDie(adminKubeConfigFile string) *restclient.Config
GetClusterAdminClientConfigOrDie returns a REST config for the cluster admin user or panic.
func GetClusterAdminKubeClient ¶
func GetClusterAdminKubeClient(adminKubeConfigFile string) (kclientset.Interface, error)
func GetScopedClientForUser ¶
func GetScopedClientForUser(clusterAdminClientConfig *restclient.Config, username string, scopes []string) (kclientset.Interface, *restclient.Config, error)
func GetTemplateFixture ¶
func GetTemplateFixture(filename string) (*templateapi.Template, error)
func KubeConfigPath ¶
func KubeConfigPath() string
func Namespace ¶
func Namespace() string
Namespace returns the test namespace. The default namespace is set to 'integration-test'. You can override it by setting the 'OS_TEST_NAMESPACE' environment variable
func NewDockerClient ¶
func NewDockerClient() (*dockerClient.Client, error)
newDockerClient creates a docker client using the env var DOCKER_ENDPOINT or, if not supplied, uses the default docker endpoint /var/run/docker.sock
func NewTestLDAPServer ¶
func NewTestLDAPServer() *testLDAPServer
func RandomNamespace ¶
RandomNamespace provides random Kubernetes namespace name based on the UNIX timestamp. Optionally you can set the prefix.
func RequireDocker ¶
func RequireDocker()
RequireDocker ensures that a new docker client can be created and that a ListImages command can be run on the client or it fails with glog.Fatal
func SetAdditionalAllowedRegistries ¶
func SetAdditionalAllowedRegistries(hostPortGlobs ...string)
func WaitForClusterPolicyUpdate ¶
func WaitForClusterPolicyUpdate(c authorizationtypedclient.SelfSubjectAccessReviewsGetter, verb string, resource schema.GroupResource, allowed bool) error
WaitForClusterPolicyUpdate checks if the given client can perform the named verb and action. If PolicyCachePollTimeout is reached without the expected condition matching, an error is returned
func WaitForPolicyUpdate ¶
func WaitForPolicyUpdate(c authorizationtypedclient.SelfSubjectAccessReviewsGetter, namespace, verb string, resource schema.GroupResource, allowed bool) error
WaitForPolicyUpdate checks if the given client can perform the named verb and action. If PolicyCachePollTimeout is reached without the expected condition matching, an error is returned
func WaitForResourceQuotaLimitSync ¶
func WaitForResourceQuotaLimitSync( client kcoreclient.ResourceQuotaInterface, name string, hardLimit kapi.ResourceList, timeout time.Duration, ) error
WaitForResourceQuotaLimitSync watches given resource quota until its hard limit is updated to match the desired spec or timeout occurs.
Types ¶
This section is empty.