Documentation ¶
Index ¶
- Variables
- func CreateTestPod(ctrl controller.Interface, testRun *v1alpha1.TestRun, ...) (*v1.Pod, error)
- func CreateTestRunEvent(ctrl controller.Interface, testRun *v1alpha1.TestRun, testName string, ...) error
- func CreateTestRunEventStart(ctrl controller.Interface, testRun *v1alpha1.TestRun, ...) error
- func InstallAllCRDs(clientset apiextensionsclient.Interface) error
- func InstallCRD(clientset apiextensionsclient.Interface, ...) (*apiextensionsv1beta1.CustomResourceDefinition, error)
- func NewTestInformer(sharedFactory factory.SharedInformerFactory, ...) cache.SharedIndexInformer
- func NewTestRunInformer(sharedFactory factory.SharedInformerFactory, ...) cache.SharedIndexInformer
- func SetupPodInformer(podInformer cache.SharedIndexInformer, queue workqueue.RateLimitingInterface) cache.SharedIndexInformer
- type Interface
- type ReconsileType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // APIVersion FIXME: not sure why this is needed APIVersion = "srossross.github.io/v1alpha1" // TestRunKind FIXME: not sure why this is needed TestRunKind = "TestRun" )
View Source
var ( // ReconsilePodStatus tells the Reconcile loop that a pod status has changed ReconsilePodStatus = "Pod" // ReconsileTestRun tells the Reconcile loop that a test run has changed ReconsileTestRun = "TestRun" )
View Source
var TestRunCRD = &apiextensionsv1beta1.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: TestRunCRDName, }, Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ Group: Srossross.GroupName, Version: "v1alpha1", Scope: apiextensionsv1beta1.NamespaceScoped, Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ Plural: "testruns", Kind: "TestRun", ShortNames: []string{"tr"}, }, }, }
TestRunCRD exposes the testrun as a crd
View Source
var TestRunCRDName = "testruns.srossross.github.io"
TestRunCRDName FIXME: could generate this ?
View Source
var TestTemplateCRD = &apiextensionsv1beta1.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: TestTemplateCRDName, }, Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ Group: Srossross.GroupName, Version: "v1alpha1", Scope: apiextensionsv1beta1.NamespaceScoped, Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ Plural: "testtemplates", Kind: "TestTemplate", ShortNames: []string{"test", "tests"}, }, }, }
TestTemplateCRD exposes a test as a crd
View Source
var TestTemplateCRDName = "testtemplates.srossross.github.io"
TestTemplateCRDName FIXME: could generate this ?
Functions ¶
func CreateTestPod ¶
func CreateTestPod(ctrl controller.Interface, testRun *v1alpha1.TestRun, test *v1alpha1.TestTemplate) (*v1.Pod, error)
CreateTestPod creates a test pod from a test template
func CreateTestRunEvent ¶
func CreateTestRunEvent( ctrl controller.Interface, testRun *v1alpha1.TestRun, testName string, Reason string, Message string, ) error
CreateTestRunEvent creates an event
func CreateTestRunEventStart ¶
func CreateTestRunEventStart(ctrl controller.Interface, testRun *v1alpha1.TestRun, test *v1alpha1.TestTemplate) error
CreateTestRunEventStart will create a k8s event when a test pod is created
func InstallAllCRDs ¶
func InstallAllCRDs(clientset apiextensionsclient.Interface) error
InstallAllCRDs and wait for them to be ready
func InstallCRD ¶
func InstallCRD(clientset apiextensionsclient.Interface, crdDef *apiextensionsv1beta1.CustomResourceDefinition) (*apiextensionsv1beta1.CustomResourceDefinition, error)
InstallCRD and wait for it to be ready
func NewTestInformer ¶
func NewTestInformer(sharedFactory factory.SharedInformerFactory, queue workqueue.RateLimitingInterface) cache.SharedIndexInformer
NewTestInformer creates a new test Informer that watches and caches tests
func NewTestRunInformer ¶
func NewTestRunInformer( sharedFactory factory.SharedInformerFactory, queue workqueue.RateLimitingInterface, ) cache.SharedIndexInformer
NewTestRunInformer creates a new test run Informer that watches and caches testruns
func SetupPodInformer ¶
func SetupPodInformer(podInformer cache.SharedIndexInformer, queue workqueue.RateLimitingInterface) cache.SharedIndexInformer
SetupPodInformer creates a new test Informer that watches and caches pods
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.