Documentation ¶
Index ¶
- Constants
- type TestHarnessController
- func (c *TestHarnessController) CreateCustomResource() (err error)
- func (c *TestHarnessController) CreateKubernetesPullerImageConfigMap() error
- func (c *TestHarnessController) CreateKubernetesPullerImageDeployment() error
- func (c *TestHarnessController) CreateKubernetesPullerImageRole() error
- func (c *TestHarnessController) CreateKubernetesPullerImageRoleBinding() error
- func (c *TestHarnessController) CreateKubernetesPullerImageServiceAccount() error
- func (c *TestHarnessController) CreateNamespace() error
- func (c TestHarnessController) DeleteCustomResource() (err error)
- func (c *TestHarnessController) DeleteNamespace() error
- func (c *TestHarnessController) DeployKubernetesPullerImage() error
- func (c *TestHarnessController) GetCustomResource() (*orgv1.CheCluster, error)
- func (c *TestHarnessController) ListPods(namespace, selector string) (*v1.PodList, error)
- func (c *TestHarnessController) RunTestHarness() bool
- func (c *TestHarnessController) WaitForPodBySelectorRunning(namespace, selector string, timeout int, workspaceStack string) error
- func (c *TestHarnessController) WatchCustomResource(status string) (deployed bool, err error)
- func (c *TestHarnessController) WatchPodStartup(namespace string, label string, workspaceStack string) (deployed bool, err error)
Constants ¶
const ( KubernetesPullerImageLabel = "test=daemonset-test" KubernetesImgPullerNS = "k8s-image-puller" )
const (
CheKind = "checlusters"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestHarnessController ¶
type TestHarnessController struct { sync.Mutex Logger logger.Log // contains filtered or unexported fields }
TestHarnessController useful to add all kubernetes objects to cluster.
func NewTestHarnessController ¶
func NewTestHarnessController(c *client.K8sClient) *TestHarnessController
NewTestHarnessController creates a new TestHarnessController from a given client.
func (*TestHarnessController) CreateCustomResource ¶
func (c *TestHarnessController) CreateCustomResource() (err error)
CreateCustomResource make an api request to K8s API to delete Che Cluster
func (*TestHarnessController) CreateKubernetesPullerImageConfigMap ¶
func (c *TestHarnessController) CreateKubernetesPullerImageConfigMap() error
CreateKubernetesPullerImageConfigMap create secrets maps for kubernetes image puller
func (*TestHarnessController) CreateKubernetesPullerImageDeployment ¶
func (c *TestHarnessController) CreateKubernetesPullerImageDeployment() error
CreateKubernetesPullerImageDeployment create deployment for kubernetes image puller
func (*TestHarnessController) CreateKubernetesPullerImageRole ¶
func (c *TestHarnessController) CreateKubernetesPullerImageRole() error
CreateKubernetesPullerImageRole create roles for kubernetes image puller
func (*TestHarnessController) CreateKubernetesPullerImageRoleBinding ¶
func (c *TestHarnessController) CreateKubernetesPullerImageRoleBinding() error
CreateKubernetesPullerImageRoleBinding create roles binding for kubernetes image puller
func (*TestHarnessController) CreateKubernetesPullerImageServiceAccount ¶
func (c *TestHarnessController) CreateKubernetesPullerImageServiceAccount() error
CreateKubernetesPullerImageServiceAccount create a service account for kubernetes image puller
func (*TestHarnessController) CreateNamespace ¶
func (c *TestHarnessController) CreateNamespace() error
Create a new kubernetes image puller !TODO Make creation of namespace configurable. Don't create namespace only for k8s-image-puller. Same for Namespace deletion
func (TestHarnessController) DeleteCustomResource ¶
func (c TestHarnessController) DeleteCustomResource() (err error)
DeleteCustomResource make an api request to K8s API to delete Che Cluster
func (*TestHarnessController) DeleteNamespace ¶
func (c *TestHarnessController) DeleteNamespace() error
Delete a kubernetes image puller namespace
func (*TestHarnessController) DeployKubernetesPullerImage ¶
func (c *TestHarnessController) DeployKubernetesPullerImage() error
DeployKubernetesPullerImage Creates all configs and deploy kubernetes image puller in cluster
func (*TestHarnessController) GetCustomResource ¶
func (c *TestHarnessController) GetCustomResource() (*orgv1.CheCluster, error)
GetCustomResource make an api request to K8s API to get Che Cluster
func (*TestHarnessController) ListPods ¶
func (c *TestHarnessController) ListPods(namespace, selector string) (*v1.PodList, error)
Returns the list of currently scheduled or running pods in `namespace` with the given selector
func (*TestHarnessController) RunTestHarness ¶
func (c *TestHarnessController) RunTestHarness() bool
func (*TestHarnessController) WaitForPodBySelectorRunning ¶
func (c *TestHarnessController) WaitForPodBySelectorRunning(namespace, selector string, timeout int, workspaceStack string) error
Wait up to timeout seconds for all pods in 'namespace' with given 'selector' to enter running state. Returns an error if no pods are found or not all discovered pods enter running state.
func (*TestHarnessController) WatchCustomResource ¶
func (c *TestHarnessController) WatchCustomResource(status string) (deployed bool, err error)
WatchCustomResource wait to deploy all che/crw pods