Documentation ¶
Index ¶
- Variables
- func DeleteNamespace(namespaces corev1.NamespaceInterface, ns string, waitForDeletion bool) error
- type Namespace
- func (ns *Namespace) As(user rest.ImpersonationConfig) (*Namespace, error)
- func (ns *Namespace) ConfigMaps() corev1.ConfigMapInterface
- func (ns *Namespace) ContainsNPods(count int) wait.ConditionFunc
- func (ns *Namespace) ContainsNPodsMatchingSelector(count int, labelSelector string) wait.ConditionFunc
- func (ns *Namespace) ContainsNPodsWithPredicate(count int, labelSelector string, predicate PodPredicate) wait.ConditionFunc
- func (ns *Namespace) ContainsNStacks(count int) wait.ConditionFunc
- func (ns *Namespace) ContainsZeroPod() wait.ConditionFunc
- func (ns *Namespace) ContainsZeroStack() wait.ConditionFunc
- func (ns *Namespace) CreatePullSecret(name, server, username, password string) error
- func (ns *Namespace) CreateStack(strategy StackOperationStrategy, name, composeFile string) (*v1alpha3.Stack, error)
- func (ns *Namespace) DeleteStack(name string) error
- func (ns *Namespace) DeleteStackWithPropagation(name string, propagation metav1.DeletionPropagation) error
- func (ns *Namespace) DeleteStacks() error
- func (ns *Namespace) DeleteStacksv1() error
- func (ns *Namespace) DeleteStackv1(name string) error
- func (ns *Namespace) Deployments() typesappsv1.DeploymentInterface
- func (ns *Namespace) GetStack(name string) (*v1alpha3.Stack, error)
- func (ns *Namespace) HasStorageClass() (bool, error)
- func (ns *Namespace) IsServiceNotPresent(labelSelector string) wait.ConditionFunc
- func (ns *Namespace) IsServicePresent(labelSelector string) wait.ConditionFunc
- func (ns *Namespace) IsServiceResponding(service string, url string, expectedText string) wait.ConditionFunc
- func (ns *Namespace) IsStackAvailable(name string) wait.ConditionFunc
- func (ns *Namespace) IsStackFailed(name string, errorSubstr string) wait.ConditionFunc
- func (ns *Namespace) ListAllPods() ([]apiv1.Pod, error)
- func (ns *Namespace) ListDeployments(labelSelector string) ([]appsv1.Deployment, error)
- func (ns *Namespace) ListNodes() ([]apiv1.Node, error)
- func (ns *Namespace) ListPods(labelSelector string) ([]apiv1.Pod, error)
- func (ns *Namespace) ListServices(labelSelector string) ([]apiv1.Service, error)
- func (ns *Namespace) ListStacks() ([]v1alpha3.Stack, error)
- func (ns *Namespace) Name() string
- func (ns *Namespace) PodIsActuallyRemoved(name string) wait.ConditionFunc
- func (ns *Namespace) Pods() corev1.PodInterface
- func (ns *Namespace) RESTClientV1alpha3() rest.Interface
- func (ns *Namespace) RESTClientV1beta2() rest.Interface
- func (ns *Namespace) Secrets() corev1.SecretInterface
- func (ns *Namespace) ServiceCount(labelSelector string, count int) wait.ConditionFunc
- func (ns *Namespace) Services() corev1.ServiceInterface
- func (ns *Namespace) StacksV1alpha3() composev1alpha3.StackInterface
- func (ns *Namespace) StacksV1beta1() composev1beta1.StackInterface
- func (ns *Namespace) UpdateStack(strategy StackOperationStrategy, name, composeFile string) (*v1alpha3.Stack, error)
- func (ns *Namespace) UpdateStackFromSpec(name string, newStack *v1alpha3.Stack) (*v1alpha3.Stack, error)
- type PodPredicate
- type StackOperationStrategy
Constants ¶
This section is empty.
Variables ¶
var By = ginkgo.By
By is an alias to ginkgo.By
Functions ¶
func DeleteNamespace ¶
func DeleteNamespace(namespaces corev1.NamespaceInterface, ns string, waitForDeletion bool) error
DeleteNamespace deletes a namespace
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace is a test dedicated namespace
func CreateNamespace ¶
CreateNamespace creates a namespace
func (*Namespace) As ¶ added in v0.4.18
func (ns *Namespace) As(user rest.ImpersonationConfig) (*Namespace, error)
As returns the same namespace with an impersonated config
func (*Namespace) ConfigMaps ¶
func (ns *Namespace) ConfigMaps() corev1.ConfigMapInterface
ConfigMaps returns a ConfigMaps client for the namespace
func (*Namespace) ContainsNPods ¶
func (ns *Namespace) ContainsNPods(count int) wait.ConditionFunc
ContainsNPods is a poller that checks how many pods are created.
func (*Namespace) ContainsNPodsMatchingSelector ¶
func (ns *Namespace) ContainsNPodsMatchingSelector(count int, labelSelector string) wait.ConditionFunc
ContainsNPodsMatchingSelector is a poller that checks how many pods are created for given label selector.
func (*Namespace) ContainsNPodsWithPredicate ¶
func (ns *Namespace) ContainsNPodsWithPredicate(count int, labelSelector string, predicate PodPredicate) wait.ConditionFunc
ContainsNPodsWithPredicate is a poller that checks how many pods matching the predicate are created.
func (*Namespace) ContainsNStacks ¶
func (ns *Namespace) ContainsNStacks(count int) wait.ConditionFunc
ContainsNStacks is a poller that checks how many stacks are created.
func (*Namespace) ContainsZeroPod ¶
func (ns *Namespace) ContainsZeroPod() wait.ConditionFunc
ContainsZeroPod is a poller that checks that no pod is created.
func (*Namespace) ContainsZeroStack ¶
func (ns *Namespace) ContainsZeroStack() wait.ConditionFunc
ContainsZeroStack is a poller that checks that no stack is created.
func (*Namespace) CreatePullSecret ¶ added in v0.4.19
CreatePullSecret creates a pull secret
func (*Namespace) CreateStack ¶
func (ns *Namespace) CreateStack(strategy StackOperationStrategy, name, composeFile string) (*v1alpha3.Stack, error)
CreateStack creates a stack.
func (*Namespace) DeleteStack ¶
DeleteStack deletes a stack.
func (*Namespace) DeleteStackWithPropagation ¶ added in v0.4.19
func (ns *Namespace) DeleteStackWithPropagation(name string, propagation metav1.DeletionPropagation) error
DeleteStackWithPropagation deletes a stack using the specified propagation.
func (*Namespace) DeleteStacks ¶
DeleteStacks deletes all stacks.
func (*Namespace) DeleteStacksv1 ¶
DeleteStacksv1 deletes all stacks.
func (*Namespace) DeleteStackv1 ¶
DeleteStackv1 deletes a stack.
func (*Namespace) Deployments ¶
func (ns *Namespace) Deployments() typesappsv1.DeploymentInterface
Deployments returns a DeploymentInterface
func (*Namespace) HasStorageClass ¶
HasStorageClass returns true if cluster has at least one StorageClass defined
func (*Namespace) IsServiceNotPresent ¶
func (ns *Namespace) IsServiceNotPresent(labelSelector string) wait.ConditionFunc
IsServiceNotPresent is a poller that checks if a service is not present.
func (*Namespace) IsServicePresent ¶
func (ns *Namespace) IsServicePresent(labelSelector string) wait.ConditionFunc
IsServicePresent is a poller that checks if a service is present.
func (*Namespace) IsServiceResponding ¶
func (ns *Namespace) IsServiceResponding(service string, url string, expectedText string) wait.ConditionFunc
IsServiceResponding is a poller that checks is responding with the expected content text.
func (*Namespace) IsStackAvailable ¶
func (ns *Namespace) IsStackAvailable(name string) wait.ConditionFunc
IsStackAvailable is a poller that checks is a given stack is available.
func (*Namespace) IsStackFailed ¶
func (ns *Namespace) IsStackFailed(name string, errorSubstr string) wait.ConditionFunc
IsStackFailed is a poller that checks if a given stack has failed with the correct error.
func (*Namespace) ListAllPods ¶
ListAllPods lists all pods in the namespace.
func (*Namespace) ListDeployments ¶
func (ns *Namespace) ListDeployments(labelSelector string) ([]appsv1.Deployment, error)
ListDeployments lists the deployments that match a given selector.
func (*Namespace) ListServices ¶
ListServices lists the services that match a given selector.
func (*Namespace) ListStacks ¶
ListStacks lists the stacks.
func (*Namespace) PodIsActuallyRemoved ¶
func (ns *Namespace) PodIsActuallyRemoved(name string) wait.ConditionFunc
PodIsActuallyRemoved is a poller that checks that a pod has been terminated
func (*Namespace) Pods ¶
func (ns *Namespace) Pods() corev1.PodInterface
Pods returns a PodInterface
func (*Namespace) RESTClientV1alpha3 ¶ added in v0.4.19
RESTClientV1alpha3 returns a RESTClient for the stacks
func (*Namespace) RESTClientV1beta2 ¶ added in v0.4.19
RESTClientV1beta2 returns a RESTClient for the stacks
func (*Namespace) Secrets ¶
func (ns *Namespace) Secrets() corev1.SecretInterface
Secrets returns a Secrets client for the namespace
func (*Namespace) ServiceCount ¶
func (ns *Namespace) ServiceCount(labelSelector string, count int) wait.ConditionFunc
ServiceCount is a poller that checks a number of services to be present.
func (*Namespace) Services ¶ added in v0.4.21
func (ns *Namespace) Services() corev1.ServiceInterface
Services returns a Services client for the namespace
func (*Namespace) StacksV1alpha3 ¶ added in v0.4.19
func (ns *Namespace) StacksV1alpha3() composev1alpha3.StackInterface
StacksV1alpha3 returns a v1alpha3 client
func (*Namespace) StacksV1beta1 ¶
func (ns *Namespace) StacksV1beta1() composev1beta1.StackInterface
StacksV1beta1 returns a v1beta1 client
func (*Namespace) UpdateStack ¶
func (ns *Namespace) UpdateStack(strategy StackOperationStrategy, name, composeFile string) (*v1alpha3.Stack, error)
UpdateStack updates a stack.
type PodPredicate ¶
PodPredicate returns true when a predicate is verified on a pod and an optional message indicating why the predicate is false
type StackOperationStrategy ¶
type StackOperationStrategy int
StackOperationStrategy is the strategy for a stack create/update
const ( //StackOperationV1beta1 will use v1beta1 API StackOperationV1beta1 StackOperationStrategy = iota //StackOperationV1beta2Compose will use v1beta2 composefile subresource StackOperationV1beta2Compose //StackOperationV1beta2Stack will use v1beta2 structured stack StackOperationV1beta2Stack //StackOperationV1alpha3 will use a v1alpha3 structured stack StackOperationV1alpha3 )