controller

package
v0.0.0-...-3d8bab0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestRunFilter

func TestRunFilter(pods []*v1.Pod, testRunName string) []*v1.Pod

TestRunFilter filter pods that were instantiated with testrun of name testRunName

Types

type Interface

type Interface interface {
	TestTemplateLister() listerV1alpha1.TestTemplateLister
	TestRunLister() listerV1alpha1.TestRunLister
	SrossrossV1alpha1() srossrossv1alpha1.SrossrossV1alpha1Interface

	PodInformer() cache.SharedIndexInformer
	CoreV1() typedv1.CoreV1Interface

	GetTestRunFromKey(key string) (*v1alpha1.TestRun, error)
	GetPodAndTestRunFromKey(key string) (*v1alpha1.TestRun, *corev1.Pod, error)
	TestRunnerRemovePodsForDeletedTest(key string) error

	CreatePod(Namespace string, pod *corev1.Pod) (*corev1.Pod, error)
	ListPods(Namespace string, selector labels.Selector) ([]*corev1.Pod, error)
	GetPod(Namespace string, Name string) (*corev1.Pod, error)
}

Interface for a TestController

func NewTestController

func NewTestController(sharedFactory *factory.SharedInformerFactory, testClient client.Interface, coreV1Client typedv1.CoreV1Interface) Interface

NewTestController creates a new TestController

type TestController

type TestController struct {
	// contains filtered or unexported fields
}

TestController creates a single interface to run the reconsile loop

func (*TestController) CoreV1

func (ctrl *TestController) CoreV1() typedv1.CoreV1Interface

CoreV1 get CoreV1 client

func (*TestController) CreatePod

func (ctrl *TestController) CreatePod(Namespace string, pod *corev1.Pod) (*corev1.Pod, error)

func (*TestController) GetPod

func (ctrl *TestController) GetPod(Namespace string, Name string) (*corev1.Pod, error)

func (*TestController) GetPodAndTestRunFromKey

func (ctrl *TestController) GetPodAndTestRunFromKey(key string) (*v1alpha1.TestRun, *v1.Pod, error)

GetPodAndTestRunFromKey get a test run from a key put on the queue

func (*TestController) GetTestRunFromKey

func (ctrl *TestController) GetTestRunFromKey(key string) (*v1alpha1.TestRun, error)

GetTestRunFromKey get a test run from a key put on the queue

func (*TestController) ListPods

func (ctrl *TestController) ListPods(Namespace string, selector labels.Selector) ([]*corev1.Pod, error)

func (*TestController) PodInformer

func (ctrl *TestController) PodInformer() cache.SharedIndexInformer

PodInformer returns an informer for a pod and registers it with the SharedInformerFactory

func (*TestController) PodLister

func (ctrl *TestController) PodLister() listerv1.PodLister

PodLister gets a corev1 podlister

func (*TestController) SrossrossV1alpha1

SrossrossV1alpha1 get SrossrossV1alpha1 client

func (*TestController) TestRunLister

func (ctrl *TestController) TestRunLister() listerV1alpha1.TestRunLister

TestRunLister get a testrun lister

func (*TestController) TestRunnerRemovePodsForDeletedTest

func (ctrl *TestController) TestRunnerRemovePodsForDeletedTest(
	key string,
) error

TestRunnerRemovePodsForDeletedTest will remove pods with test as owner

func (*TestController) TestTemplateLister

func (ctrl *TestController) TestTemplateLister() listerV1alpha1.TestTemplateLister

TestTemplateLister get a testlister

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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