v1

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the testtriggers v1 API group +kubebuilder:object:generate=true +groupName=tests.testkube.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// Group represents the API Group
	Group = "tests.testkube.io"
	// Version represents the Resource version
	Version = "v1"
	// Resource corresponds to the CRD Kind
	Resource = "TestTrigger"

	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: Group, Version: Version}
	// GroupVersionResource is group, version and resource used to register these objects
	GroupVersionResource = schema.GroupVersionResource{Group: Group, Version: Version, Resource: Resource}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type TestTrigger

type TestTrigger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TestTriggerSpec   `json:"spec,omitempty"`
	Status TestTriggerStatus `json:"status,omitempty"`
}

TestTrigger is the Schema for the testtriggers API +kubebuilder:printcolumn:name="Resource",type=string,JSONPath=`.spec.resource` +kubebuilder:printcolumn:name="Event",type=string,JSONPath=`.spec.event` +kubebuilder:printcolumn:name="Execution",type=string,JSONPath=`.spec.execution` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*TestTrigger) DeepCopy

func (in *TestTrigger) DeepCopy() *TestTrigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTrigger.

func (*TestTrigger) DeepCopyInto

func (in *TestTrigger) DeepCopyInto(out *TestTrigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestTrigger) DeepCopyObject

func (in *TestTrigger) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TestTrigger) SetupWebhookWithManager

func (in *TestTrigger) SetupWebhookWithManager(mgr ctrl.Manager, validator TestTriggerValidator) error

func (*TestTrigger) ValidateCreate

func (in *TestTrigger) ValidateCreate() error

func (*TestTrigger) ValidateDelete

func (in *TestTrigger) ValidateDelete() error

func (*TestTrigger) ValidateUpdate

func (in *TestTrigger) ValidateUpdate(old runtime.Object) error

type TestTriggerCondition added in v1.8.5

type TestTriggerCondition struct {
	Status *TestTriggerConditionStatuses `json:"status"`
	// test trigger condition
	Type_ string `json:"type"`
	// test trigger condition reason
	Reason string `json:"reason,omitempty"`
}

TestTriggerCondition is used for definition of the condition for test triggers

func (*TestTriggerCondition) DeepCopy added in v1.8.5

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerCondition.

func (*TestTriggerCondition) DeepCopyInto added in v1.8.5

func (in *TestTriggerCondition) DeepCopyInto(out *TestTriggerCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestTriggerConditionSpec added in v1.8.5

type TestTriggerConditionSpec struct {
	// list of test trigger conditions
	Conditions []TestTriggerCondition `json:"conditions,omitempty"`
	// duration in seconds the test trigger waits for conditions, until its stopped
	Timeout int32 `json:"timeout,omitempty"`
}

TestTriggerConditionSpec defines the condition specification for TestTrigger

func (*TestTriggerConditionSpec) DeepCopy added in v1.8.5

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerConditionSpec.

func (*TestTriggerConditionSpec) DeepCopyInto added in v1.8.5

func (in *TestTriggerConditionSpec) DeepCopyInto(out *TestTriggerConditionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestTriggerConditionStatuses added in v1.8.5

type TestTriggerConditionStatuses string

TestTriggerConditionStatuses defines condition statuses for test triggers

const (
	TRUE_TestTriggerConditionStatuses    TestTriggerConditionStatuses = "True"
	FALSE_TestTriggerConditionStatuses   TestTriggerConditionStatuses = "False"
	UNKNOWN_TestTriggerConditionStatuses TestTriggerConditionStatuses = "Unknown"
)

List of TestTriggerConditionStatuses

type TestTriggerList

type TestTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TestTrigger `json:"items"`
}

TestTriggerList contains a list of TestTrigger

func (*TestTriggerList) DeepCopy

func (in *TestTriggerList) DeepCopy() *TestTriggerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerList.

func (*TestTriggerList) DeepCopyInto

func (in *TestTriggerList) DeepCopyInto(out *TestTriggerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestTriggerList) DeepCopyObject

func (in *TestTriggerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TestTriggerSelector

type TestTriggerSelector struct {
	// Name selector is used to identify a Kubernetes Object based on the metadata name
	Name string `json:"name,omitempty"`
	// Namespace of the Kubernetes object
	Namespace string `json:"namespace,omitempty"`
	// LabelSelector is used to identify a group of Kubernetes Objects based on their metadata labels
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
}

TestTriggerSelector is used for selecting Kubernetes Objects

func (*TestTriggerSelector) DeepCopy

func (in *TestTriggerSelector) DeepCopy() *TestTriggerSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerSelector.

func (*TestTriggerSelector) DeepCopyInto

func (in *TestTriggerSelector) DeepCopyInto(out *TestTriggerSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestTriggerSpec

type TestTriggerSpec struct {
	// For which Resource do we monitor Event which triggers an Action on certain conditions
	Resource string `json:"resource"`
	// ResourceSelector identifies which Kubernetes Objects should be watched
	ResourceSelector TestTriggerSelector `json:"resourceSelector"`
	// On which Event for a Resource should an Action be triggered
	Event string `json:"event"`
	// What resource conditions should be matched
	ConditionSpec *TestTriggerConditionSpec `json:"conditionSpec,omitempty"`
	// Action represents what needs to be executed for selected Execution
	Action string `json:"action"`
	// Execution identifies for which test execution should an Action be executed
	Execution string `json:"execution"`
	// TestSelector identifies on which Testkube Kubernetes Objects an Action should be taken
	TestSelector TestTriggerSelector `json:"testSelector"`
	// Delay is a duration string which specifies how long should the test be delayed after a trigger is matched
	// +kubebuilder:validation:Type:=string
	// +kubebuilder:validation:Format:=duration
	Delay *metav1.Duration `json:"delay,omitempty"`
}

TestTriggerSpec defines the desired state of TestTrigger

func (*TestTriggerSpec) DeepCopy

func (in *TestTriggerSpec) DeepCopy() *TestTriggerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerSpec.

func (*TestTriggerSpec) DeepCopyInto

func (in *TestTriggerSpec) DeepCopyInto(out *TestTriggerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestTriggerStatus

type TestTriggerStatus struct {
}

TestTriggerStatus defines the observed state of TestTrigger

func (*TestTriggerStatus) DeepCopy

func (in *TestTriggerStatus) DeepCopy() *TestTriggerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerStatus.

func (*TestTriggerStatus) DeepCopyInto

func (in *TestTriggerStatus) DeepCopyInto(out *TestTriggerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestTriggerValidator

type TestTriggerValidator interface {
	ValidateCreate(context.Context, *TestTrigger) error
	ValidateUpdate(ctx context.Context, old runtime.Object, new *TestTrigger) error
	ValidateDelete(context.Context, *TestTrigger) error
}

+k8s:deepcopy-gen=false

Jump to

Keyboard shortcuts

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