controller

package
v0.0.0-...-6dbdb44 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: EPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubernetesPullerImageLabel = "test=daemonset-test"
	KubernetesImgPullerNS      = "k8s-image-puller"
)
View Source
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

func (*TestHarnessController) WatchPodStartup

func (c *TestHarnessController) WatchPodStartup(namespace string, label string, workspaceStack string) (deployed bool, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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