Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the testtriggers v1 API group +kubebuilder:object:generate=true +groupName=tests.testkube.io
Index ¶
- Variables
- type TestTrigger
- func (in *TestTrigger) DeepCopy() *TestTrigger
- func (in *TestTrigger) DeepCopyInto(out *TestTrigger)
- func (in *TestTrigger) DeepCopyObject() runtime.Object
- func (in *TestTrigger) SetupWebhookWithManager(mgr ctrl.Manager, validator TestTriggerValidator) error
- func (in *TestTrigger) ValidateCreate() (admission.Warnings, error)
- func (in *TestTrigger) ValidateDelete() (admission.Warnings, error)
- func (in *TestTrigger) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type TestTriggerAction
- type TestTriggerConcurrencyPolicy
- type TestTriggerCondition
- type TestTriggerConditionSpec
- type TestTriggerConditionStatuses
- type TestTriggerEvent
- type TestTriggerExecution
- type TestTriggerList
- type TestTriggerProbe
- type TestTriggerProbeSpec
- type TestTriggerResource
- type TestTriggerSelector
- type TestTriggerSpec
- type TestTriggerStatus
- type TestTriggerValidator
Constants ¶
This section is empty.
Variables ¶
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() (admission.Warnings, error)
func (*TestTrigger) ValidateDelete ¶
func (in *TestTrigger) ValidateDelete() (admission.Warnings, error)
func (*TestTrigger) ValidateUpdate ¶
type TestTriggerAction ¶
type TestTriggerAction string
TestTriggerAction defines action for test triggers +kubebuilder:validation:Enum=run
const (
TestTriggerActionRun TestTriggerAction = "run"
)
List of TestTriggerAction
type TestTriggerConcurrencyPolicy ¶
type TestTriggerConcurrencyPolicy string
TestTriggerConcurrencyPolicy defines concurrency policy for test triggers +kubebuilder:validation:Enum=allow;forbid;replace
const ( TestTriggerConcurrencyPolicyAllow TestTriggerConcurrencyPolicy = "allow" TestTriggerConcurrencyPolicyForbid TestTriggerConcurrencyPolicy = "forbid" TestTriggerConcurrencyPolicyReplace TestTriggerConcurrencyPolicy = "replace" )
List of TestTriggerConcurrencyPolicy
type TestTriggerCondition ¶
type TestTriggerCondition struct { Status *TestTriggerConditionStatuses `json:"status"` // test trigger condition Type_ string `json:"type"` // test trigger condition reason Reason string `json:"reason,omitempty"` // duration in seconds in the past from current time when the condition is still valid Ttl int32 `json:"ttl,omitempty"` }
TestTriggerCondition is used for definition of the condition for test triggers
func (*TestTriggerCondition) DeepCopy ¶
func (in *TestTriggerCondition) DeepCopy() *TestTriggerCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerCondition.
func (*TestTriggerCondition) DeepCopyInto ¶
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 ¶
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"` // duration in seconds the test trigger waits between condition check Delay int32 `json:"delay,omitempty"` }
TestTriggerConditionSpec defines the condition specification for TestTrigger
func (*TestTriggerConditionSpec) DeepCopy ¶
func (in *TestTriggerConditionSpec) DeepCopy() *TestTriggerConditionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerConditionSpec.
func (*TestTriggerConditionSpec) DeepCopyInto ¶
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 ¶
type TestTriggerConditionStatuses string
TestTriggerConditionStatuses defines condition statuses for test triggers +kubebuilder:validation:Enum=True;False;Unknown
const ( TRUE_TestTriggerConditionStatuses TestTriggerConditionStatuses = "True" FALSE_TestTriggerConditionStatuses TestTriggerConditionStatuses = "False" UNKNOWN_TestTriggerConditionStatuses TestTriggerConditionStatuses = "Unknown" )
List of TestTriggerConditionStatuses
type TestTriggerEvent ¶
type TestTriggerEvent string
TestTriggerEvent defines event for test triggers +kubebuilder:validation:Enum=created;modified;deleted;deployment-scale-update;deployment-image-update;deployment-env-update;deployment-containers-modified
const ( TestTriggerEventCreated TestTriggerEvent = "created" TestTriggerEventModified TestTriggerEvent = "modified" TestTriggerEventDeleted TestTriggerEvent = "deleted" TestTriggerCauseDeploymentScaleUpdate TestTriggerEvent = "deployment-scale-update" TestTriggerCauseDeploymentImageUpdate TestTriggerEvent = "deployment-image-update" TestTriggerCauseDeploymentEnvUpdate TestTriggerEvent = "deployment-env-update" TestTriggerCauseDeploymentContainersModified TestTriggerEvent = "deployment-containers-modified" )
List of TestTriggerEvents
type TestTriggerExecution ¶
type TestTriggerExecution string
TestTriggerExecution defines execution for test triggers +kubebuilder:validation:Enum=test;testsuite
const ( TestTriggerExecutionTest TestTriggerExecution = "test" TestTriggerExecutionTestsuite TestTriggerExecution = "testsuite" )
List of TestTriggerExecution
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 TestTriggerProbe ¶
type TestTriggerProbe struct { // test trigger condition probe scheme to connect to host, default is http Scheme string `json:"scheme,omitempty"` // test trigger condition probe host, default is pod ip or service name Host string `json:"host,omitempty"` // test trigger condition probe path to check, default is / Path string `json:"path,omitempty"` // test trigger condition probe port to connect Port int32 `json:"port,omitempty"` // test trigger condition probe headers to submit Headers map[string]string `json:"headers,omitempty"` }
TestTriggerProbe is used for definition of the probe for test triggers
func (*TestTriggerProbe) DeepCopy ¶
func (in *TestTriggerProbe) DeepCopy() *TestTriggerProbe
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerProbe.
func (*TestTriggerProbe) DeepCopyInto ¶
func (in *TestTriggerProbe) DeepCopyInto(out *TestTriggerProbe)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestTriggerProbeSpec ¶
type TestTriggerProbeSpec struct { // list of test trigger probes Probes []TestTriggerProbe `json:"probes,omitempty"` // duration in seconds the test trigger waits for probes, until its stopped Timeout int32 `json:"timeout,omitempty"` // duration in seconds the test trigger waits between probes Delay int32 `json:"delay,omitempty"` }
TestTriggerProbeSpec defines the probe specification for TestTrigger
func (*TestTriggerProbeSpec) DeepCopy ¶
func (in *TestTriggerProbeSpec) DeepCopy() *TestTriggerProbeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerProbeSpec.
func (*TestTriggerProbeSpec) DeepCopyInto ¶
func (in *TestTriggerProbeSpec) DeepCopyInto(out *TestTriggerProbeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestTriggerResource ¶
type TestTriggerResource string
TestTriggerResource defines resource for test triggers +kubebuilder:validation:Enum=pod;deployment;statefulset;daemonset;service;ingress;event;configmap
const ( TestTriggerResourcePod TestTriggerResource = "pod" TestTriggerResourceDeployment TestTriggerResource = "deployment" TestTriggerResourceStatefulSet TestTriggerResource = "statefulset" TestTriggerResourceDaemonSet TestTriggerResource = "daemonset" TestTriggerResourceService TestTriggerResource = "service" TestTriggerResourceIngress TestTriggerResource = "ingress" TestTriggerResourceEvent TestTriggerResource = "event" TestTriggerResourceConfigMap TestTriggerResource = "configmap" )
List of TestTriggerResources
type TestTriggerSelector ¶
type TestTriggerSelector struct { // Name selector is used to identify a Kubernetes Object based on the metadata name Name string `json:"name,omitempty"` // kubernetes resource name regex NameRegex string `json:"nameRegex,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 TestTriggerResource `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 TestTriggerEvent `json:"event"` // What resource conditions should be matched ConditionSpec *TestTriggerConditionSpec `json:"conditionSpec,omitempty"` // What resource probes should be matched ProbeSpec *TestTriggerProbeSpec `json:"probeSpec,omitempty"` // Action represents what needs to be executed for selected Execution Action TestTriggerAction `json:"action"` // Execution identifies for which test execution should an Action be executed Execution TestTriggerExecution `json:"execution"` // TestSelector identifies on which Testkube Kubernetes Objects an Action should be taken TestSelector TestTriggerSelector `json:"testSelector"` // ConcurrencyPolicy defines concurrency policy for selected Execution ConcurrencyPolicy TestTriggerConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` // 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