Documentation
¶
Overview ¶
Package v3 contains API Schema definitions for the tests v3 API group +kubebuilder:object:generate=true +groupName=tests.testkube.io
Index ¶
- Variables
- type ArgsModeType
- type ArtifactRequest
- type EnvReference
- type ExecutionCore
- type ExecutionRequest
- type ExecutionStatus
- type GitAuthType
- type PodRequest
- type PodResourcesRequest
- type Repository
- type ResourceRequest
- type RunningContext
- type RunningContextType
- type SecretRef
- type Test
- type TestContent
- type TestContentType
- type TestList
- type TestSpec
- type TestStatus
- type Variable
Constants ¶
This section is empty.
Variables ¶
var ( // Group represents the API Group Group = "tests.testkube.io" // Version represents the Resource version Version = "v3" // Resource corresponds to the CRD Kind Resource = "Test" // 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 ArgsModeType ¶
type ArgsModeType string
ArgsModeType defines args mode type +kubebuilder:validation:Enum=append;override
const ( // ArgsModeTypeAppend for append args mode ArgsModeTypeAppend ArgsModeType = "append" // ArgsModeTypeOverride for override args mode ArgsModeTypeOverride ArgsModeType = "override" )
type ArtifactRequest ¶
type ArtifactRequest struct {
// artifact storage class name for container executor
StorageClassName string `json:"storageClassName,omitempty"`
// artifact volume mount path for container executor
VolumeMountPath string `json:"volumeMountPath,omitempty"`
// artifact directories for scraping
Dirs []string `json:"dirs,omitempty"`
// regexp to filter scraped artifacts, single or comma separated
Masks []string `json:"masks,omitempty"`
// artifact bucket storage
StorageBucket string `json:"storageBucket,omitempty"`
// don't use a separate folder for execution artifacts
OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"`
SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"`
}
artifact request body with test artifacts
func (*ArtifactRequest) DeepCopy ¶
func (in *ArtifactRequest) DeepCopy() *ArtifactRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest.
func (*ArtifactRequest) DeepCopyInto ¶
func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvReference ¶
type EnvReference struct {
v1.LocalObjectReference `json:"reference"`
// whether we shoud mount resource
Mount bool `json:"mount,omitempty"`
// where we shoud mount resource
MountPath string `json:"mountPath,omitempty"`
// whether we shoud map to variables from resource
MapToVariables bool `json:"mapToVariables,omitempty"`
}
Reference to env resource
func (*EnvReference) DeepCopy ¶
func (in *EnvReference) DeepCopy() *EnvReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvReference.
func (*EnvReference) DeepCopyInto ¶
func (in *EnvReference) DeepCopyInto(out *EnvReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionCore ¶
type ExecutionCore struct {
// execution id
Id string `json:"id,omitempty"`
// execution number
Number int32 `json:"number,omitempty"`
// test start time
StartTime metav1.Time `json:"startTime,omitempty"`
// test end time
EndTime metav1.Time `json:"endTime,omitempty"`
Status *ExecutionStatus `json:"status,omitempty"`
}
test execution core
func (*ExecutionCore) DeepCopy ¶
func (in *ExecutionCore) DeepCopy() *ExecutionCore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionCore.
func (*ExecutionCore) DeepCopyInto ¶
func (in *ExecutionCore) DeepCopyInto(out *ExecutionCore)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionRequest ¶
type ExecutionRequest struct {
// test execution custom name
Name string `json:"name,omitempty"`
// unique test suite name (CRD Test suite name), if it's run as a part of test suite
TestSuiteName string `json:"testSuiteName,omitempty"`
// test execution number
Number int32 `json:"number,omitempty"`
// test execution labels
ExecutionLabels map[string]string `json:"executionLabels,omitempty"`
// test kubernetes namespace (\"testkube\" when not set)
Namespace string `json:"namespace,omitempty"`
// variables file content - need to be in format for particular executor (e.g. postman envs file)
VariablesFile string `json:"variablesFile,omitempty"`
IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"`
Variables map[string]Variable `json:"variables,omitempty"`
// test secret uuid
TestSecretUUID string `json:"testSecretUUID,omitempty"`
// test suite secret uuid, if it's run as a part of test suite
TestSuiteSecretUUID string `json:"testSuiteSecretUUID,omitempty"`
// additional executor binary arguments
Args []string `json:"args,omitempty"`
// usage mode for arguments
ArgsMode ArgsModeType `json:"argsMode,omitempty"`
// executor binary command
Command []string `json:"command,omitempty"`
// container executor image
Image string `json:"image,omitempty"`
// container executor image pull secrets
ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Environment variables passed to executor.
// Deprecated: use Basic Variables instead
Envs map[string]string `json:"envs,omitempty"`
// Execution variables passed to executor from secrets.
// Deprecated: use Secret Variables instead
SecretEnvs map[string]string `json:"secretEnvs,omitempty"`
// whether to start execution sync or async
Sync bool `json:"sync,omitempty"`
// http proxy for executor containers
HttpProxy string `json:"httpProxy,omitempty"`
// https proxy for executor containers
HttpsProxy string `json:"httpsProxy,omitempty"`
// negative test will fail the execution if it is a success and it will succeed if it is a failure
NegativeTest bool `json:"negativeTest,omitempty"`
// Optional duration in seconds the pod may be active on the node relative to
// StartTime before the system will actively try to mark it failed and kill associated containers.
// Value must be a positive integer.
ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty"`
ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"`
// job template extensions
JobTemplate string `json:"jobTemplate,omitempty"`
// name of the template resource
JobTemplateReference string `json:"jobTemplateReference,omitempty"`
// cron job template extensions
CronJobTemplate string `json:"cronJobTemplate,omitempty"`
// name of the template resource
CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"`
// script to run before test execution
PreRunScript string `json:"preRunScript,omitempty"`
// script to run after test execution
PostRunScript string `json:"postRunScript,omitempty"`
// execute post run script before scraping (prebuilt executor only)
ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
// scraper template extensions
ScraperTemplate string `json:"scraperTemplate,omitempty"`
// name of the template resource
ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"`
// pvc template extensions
PvcTemplate string `json:"pvcTemplate,omitempty"`
// name of the template resource
PvcTemplateReference string `json:"pvcTemplateReference,omitempty"`
// config map references
EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"`
// secret references
EnvSecrets []EnvReference `json:"envSecrets,omitempty"`
RunningContext *RunningContext `json:"-"`
SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"`
}
test execution request body
func (*ExecutionRequest) DeepCopy ¶
func (in *ExecutionRequest) DeepCopy() *ExecutionRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest.
func (*ExecutionRequest) DeepCopyInto ¶
func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionStatus ¶
type ExecutionStatus string
+kubebuilder:validation:Enum=queued;running;passed;failed;aborted;timeout
const ( QUEUED_ExecutionStatus ExecutionStatus = "queued" RUNNING_ExecutionStatus ExecutionStatus = "running" PASSED_ExecutionStatus ExecutionStatus = "passed" FAILED_ExecutionStatus ExecutionStatus = "failed" ABORTED_ExecutionStatus ExecutionStatus = "aborted" TIMEOUT_ExecutionStatus ExecutionStatus = "timeout" )
List of ExecutionStatus
type GitAuthType ¶
type GitAuthType string
GitAuthType defines git auth type +kubebuilder:validation:Enum=basic;header
const ( // GitAuthTypeBasic for git basic auth requests GitAuthTypeBasic GitAuthType = "basic" // GitAuthTypeHeader for git header auth requests GitAuthTypeHeader GitAuthType = "header" )
type PodRequest ¶ added in v1.16.11
type PodRequest struct {
Resources *PodResourcesRequest `json:"resources,omitempty"`
// pod template extensions
PodTemplate string `json:"podTemplate,omitempty"`
// name of the template resource
PodTemplateReference string `json:"podTemplateReference,omitempty"`
}
pod request body
func (*PodRequest) DeepCopy ¶ added in v1.16.11
func (in *PodRequest) DeepCopy() *PodRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodRequest.
func (*PodRequest) DeepCopyInto ¶ added in v1.16.11
func (in *PodRequest) DeepCopyInto(out *PodRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodResourcesRequest ¶ added in v1.16.11
type PodResourcesRequest struct {
Requests *ResourceRequest `json:"requests,omitempty"`
Limits *ResourceRequest `json:"limits,omitempty"`
}
pod resources request specification
func (*PodResourcesRequest) DeepCopy ¶ added in v1.16.11
func (in *PodResourcesRequest) DeepCopy() *PodResourcesRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourcesRequest.
func (*PodResourcesRequest) DeepCopyInto ¶ added in v1.16.11
func (in *PodResourcesRequest) DeepCopyInto(out *PodResourcesRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Repository ¶
type Repository struct {
// VCS repository type
Type_ string `json:"type,omitempty"`
// uri of content file or git directory
Uri string `json:"uri,omitempty"`
// branch/tag name for checkout
Branch string `json:"branch,omitempty"`
// commit id (sha) for checkout
Commit string `json:"commit,omitempty"`
// if needed we can checkout particular path (dir or file) in case of BIG/mono repositories
Path string `json:"path,omitempty"`
UsernameSecret *SecretRef `json:"usernameSecret,omitempty"`
TokenSecret *SecretRef `json:"tokenSecret,omitempty"`
// git auth certificate secret for private repositories
CertificateSecret string `json:"certificateSecret,omitempty"`
// if provided we checkout the whole repository and run test from this directory
WorkingDir string `json:"workingDir,omitempty"`
// auth type for git requests
AuthType GitAuthType `json:"authType,omitempty"`
}
Repository represents VCS repo, currently we're handling Git only
func (*Repository) DeepCopy ¶
func (in *Repository) DeepCopy() *Repository
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository.
func (*Repository) DeepCopyInto ¶
func (in *Repository) DeepCopyInto(out *Repository)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRequest ¶ added in v1.16.11
type ResourceRequest struct {
// requested cpu units
Cpu string `json:"cpu,omitempty"`
// requested memory units
Memory string `json:"memory,omitempty"`
}
resource request specification
func (*ResourceRequest) DeepCopy ¶ added in v1.16.11
func (in *ResourceRequest) DeepCopy() *ResourceRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest.
func (*ResourceRequest) DeepCopyInto ¶ added in v1.16.11
func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RunningContext ¶
type RunningContext struct {
// One of possible context types
Type_ RunningContextType `json:"type"`
// Context value depending from its type
Context string `json:"context,omitempty"`
}
RunningContext for test or test suite execution
func (*RunningContext) DeepCopy ¶
func (in *RunningContext) DeepCopy() *RunningContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunningContext.
func (*RunningContext) DeepCopyInto ¶
func (in *RunningContext) DeepCopyInto(out *RunningContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RunningContextType ¶
type RunningContextType string
const ( RunningContextTypeUserCLI RunningContextType = "user-cli" RunningContextTypeUserUI RunningContextType = "user-ui" RunningContextTypeTestSuite RunningContextType = "testsuite" RunningContextTypeTestTrigger RunningContextType = "testtrigger" RunningContextTypeScheduler RunningContextType = "scheduler" RunningContextTypeEmpty RunningContextType = "" )
type SecretRef ¶
type SecretRef struct {
// object kubernetes namespace
Namespace string `json:"-"`
// object name
Name string `json:"name"`
// object key
Key string `json:"key"`
}
SecretRef is the Testkube internal reference for secret storage in Kubernetes secrets
func (*SecretRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Test ¶
type Test struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TestSpec `json:"spec,omitempty"`
Status TestStatus `json:"status,omitempty"`
}
Test is the Schema for the tests API +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Test) ConvertFrom ¶
func (dst *Test) ConvertFrom(srcRaw conversion.Hub) error
ConvertFrom converts Script from the Hub version (v1) to this version.
func (*Test) ConvertTo ¶
func (src *Test) ConvertTo(dstRaw conversion.Hub) error
ConvertTo converts this Script to the Hub version (v1).
func (*Test) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (*Test) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Test) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestContent ¶
type TestContent struct {
// test type
Type_ TestContentType `json:"type,omitempty"`
// repository of test content
Repository *Repository `json:"repository,omitempty"`
// test content body
Data string `json:"data,omitempty"`
// uri of test content
Uri string `json:"uri,omitempty"`
}
TestContent defines test content
func (*TestContent) DeepCopy ¶
func (in *TestContent) DeepCopy() *TestContent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestContent.
func (*TestContent) DeepCopyInto ¶
func (in *TestContent) DeepCopyInto(out *TestContent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestContentType ¶
type TestContentType string
+kubebuilder:validation:Enum=string;file-uri;git-file;git-dir;git
const ( TestContentTypeString TestContentType = "string" TestContentTypeFileURI TestContentType = "file-uri" // Deprecated: use git instead TestContentTypeGitFile TestContentType = "git-file" // Deprecated: use git instead TestContentTypeGitDir TestContentType = "git-dir" TestContentTypeGit TestContentType = "git" )
type TestList ¶
type TestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Test `json:"items"`
}
TestList contains a list of Test
func (*TestList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestList.
func (*TestList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestSpec ¶
type TestSpec struct {
// test type
Type_ string `json:"type,omitempty"`
// test name
Name string `json:"name,omitempty"`
// test description
Description string `json:"description,omitempty"`
// test content object
Content *TestContent `json:"content,omitempty"`
// reference to test source resource
Source string `json:"source,omitempty"`
// schedule in cron job format for scheduled test execution
Schedule string `json:"schedule,omitempty"`
ExecutionRequest *ExecutionRequest `json:"executionRequest,omitempty"`
// files to be used from minio uploads
Uploads []string `json:"uploads,omitempty"`
}
TestSpec defines the desired state of Test
func (*TestSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSpec.
func (*TestSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestStatus ¶
type TestStatus struct {
// latest execution result
LatestExecution *ExecutionCore `json:"latestExecution,omitempty"`
}
TestStatus defines the observed state of Test
func (*TestStatus) DeepCopy ¶
func (in *TestStatus) DeepCopy() *TestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStatus.
func (*TestStatus) DeepCopyInto ¶
func (in *TestStatus) DeepCopyInto(out *TestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.