Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group. +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=chainsaw.kyverno.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ActionBindings
- type ActionCheck
- type ActionCheckRef
- type ActionClusters
- type ActionDryRun
- type ActionEnv
- type ActionExpectations
- type ActionFormat
- type ActionInlineResource
- type ActionObject
- type ActionObjectSelector
- type ActionOutputs
- type ActionResourceRef
- type ActionTimeout
- type Apply
- type Assert
- type Binding
- type CatchFinally
- type Check
- type Cluster
- type Clusters
- type Command
- type Compiler
- type Configuration
- type ConfigurationSpec
- type Create
- type DefaultTimeouts
- type Delete
- type Describe
- type Error
- type Events
- type Expectation
- type Expression
- type FileRef
- type Format
- type Get
- type Match
- type ObjectName
- type ObjectReference
- type ObjectType
- type Operation
- type OperationBase
- type Output
- type Patch
- type PodLogs
- type Projection
- type Proxy
- type ReportFormatType
- type Scenario
- type Script
- type Sleep
- type StepTemplate
- type StepTemplateSpec
- type Test
- type TestSpec
- type TestStep
- type TestStepSpec
- type Timeouts
- type Update
- type Use
- type Wait
- type WaitFor
- type WaitForCondition
- type WaitForDeletion
- type WaitForJsonPath
- type With
Constants ¶
const GroupName = "chainsaw.kyverno.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var (
NewAny = v1alpha1.NewAny
NewCheck = v1alpha1.NewAssertionTree
NewMatch = v1alpha1.NewAssertionTree
)
var (
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
SchemeBuilder runtime.SchemeBuilder
// Depreciated: use Install instead
AddToScheme = localSchemeBuilder.AddToScheme
Install = localSchemeBuilder.AddToScheme
)
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
Types ¶
type ActionBindings ¶ added in v0.2.5
type ActionBindings struct {
// Bindings defines additional binding key/values.
// +optional
Bindings []Binding `json:"bindings,omitempty"`
}
ActionBindings contains bindings options for an action.
func (*ActionBindings) DeepCopy ¶ added in v0.2.5
func (in *ActionBindings) DeepCopy() *ActionBindings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionBindings.
func (*ActionBindings) DeepCopyInto ¶ added in v0.2.5
func (in *ActionBindings) DeepCopyInto(out *ActionBindings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionCheck ¶ added in v0.2.5
type ActionCheck struct {
// Check is an assertion tree to validate the operation outcome.
// +optional
Check *Check `json:"check,omitempty"`
}
ActionCheck contains check for an action.
func (*ActionCheck) DeepCopy ¶ added in v0.2.5
func (in *ActionCheck) DeepCopy() *ActionCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionCheck.
func (*ActionCheck) DeepCopyInto ¶ added in v0.2.5
func (in *ActionCheck) DeepCopyInto(out *ActionCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionCheckRef ¶ added in v0.2.5
type ActionCheckRef struct {
FileRef `json:",inline"`
// Check provides a check used in assertions.
// +optional
Check *Projection `json:"resource,omitempty"`
// Template determines whether resources should be considered for templating.
// +optional
Template *bool `json:"template,omitempty"`
}
ActionCheckRef contains check reference options for an action. +kubebuilder:not:={required:{file,resource}}
func (*ActionCheckRef) DeepCopy ¶ added in v0.2.5
func (in *ActionCheckRef) DeepCopy() *ActionCheckRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionCheckRef.
func (*ActionCheckRef) DeepCopyInto ¶ added in v0.2.5
func (in *ActionCheckRef) DeepCopyInto(out *ActionCheckRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionClusters ¶ added in v0.2.5
type ActionClusters struct {
// Cluster defines the target cluster (will be inherited if not specified).
// +optional
Cluster *string `json:"cluster,omitempty"`
// Clusters holds a registry to clusters to support multi-cluster tests.
// +optional
Clusters Clusters `json:"clusters,omitempty"`
}
ActionClusters contains clusters options for an action.
func (*ActionClusters) DeepCopy ¶ added in v0.2.5
func (in *ActionClusters) DeepCopy() *ActionClusters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionClusters.
func (*ActionClusters) DeepCopyInto ¶ added in v0.2.5
func (in *ActionClusters) DeepCopyInto(out *ActionClusters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionDryRun ¶ added in v0.2.5
type ActionDryRun struct {
// DryRun determines whether the file should be applied in dry run mode.
// +optional
DryRun *bool `json:"dryRun,omitempty"`
}
ActionDryRun contains dry run options for an action.
func (*ActionDryRun) DeepCopy ¶ added in v0.2.5
func (in *ActionDryRun) DeepCopy() *ActionDryRun
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionDryRun.
func (*ActionDryRun) DeepCopyInto ¶ added in v0.2.5
func (in *ActionDryRun) DeepCopyInto(out *ActionDryRun)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionEnv ¶ added in v0.2.5
type ActionEnv struct {
// Env defines additional environment variables.
// +optional
Env []Binding `json:"env,omitempty"`
// SkipLogOutput removes the output from the command. Useful for sensitive logs or to reduce noise.
// +optional
SkipLogOutput bool `json:"skipLogOutput,omitempty"`
// SkipCommandOutput removes the command from the output logs.
// +optional
SkipCommandOutput bool `json:"skipCommandOutput,omitempty"`
}
ActionEnv contains environment options for an action.
func (*ActionEnv) DeepCopy ¶ added in v0.2.5
func (in *ActionEnv) DeepCopy() *ActionEnv
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionEnv.
func (*ActionEnv) DeepCopyInto ¶ added in v0.2.5
func (in *ActionEnv) DeepCopyInto(out *ActionEnv)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionExpectations ¶ added in v0.2.5
type ActionExpectations struct {
// Expect defines a list of matched checks to validate the operation outcome.
// +optional
Expect []Expectation `json:"expect,omitempty"`
}
ActionExpectations contains expectations for an action.
func (*ActionExpectations) DeepCopy ¶ added in v0.2.5
func (in *ActionExpectations) DeepCopy() *ActionExpectations
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionExpectations.
func (*ActionExpectations) DeepCopyInto ¶ added in v0.2.5
func (in *ActionExpectations) DeepCopyInto(out *ActionExpectations)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionFormat ¶ added in v0.2.5
type ActionFormat struct {
// Format determines the output format (json or yaml).
// +optional
Format Format `json:"format,omitempty"`
}
ActionFormat contains format for an action.
func (*ActionFormat) DeepCopy ¶ added in v0.2.5
func (in *ActionFormat) DeepCopy() *ActionFormat
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionFormat.
func (*ActionFormat) DeepCopyInto ¶ added in v0.2.5
func (in *ActionFormat) DeepCopyInto(out *ActionFormat)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionInlineResource ¶ added in v0.2.5
type ActionInlineResource struct {
// Resource provides a resource to be applied.
// +kubebuilder:validation:XEmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
// +optional
Resource *unstructured.Unstructured `json:"resource,omitempty"`
}
func (*ActionInlineResource) DeepCopy ¶ added in v0.2.5
func (in *ActionInlineResource) DeepCopy() *ActionInlineResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionInlineResource.
func (*ActionInlineResource) DeepCopyInto ¶ added in v0.2.5
func (in *ActionInlineResource) DeepCopyInto(out *ActionInlineResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionObject ¶ added in v0.2.5
type ActionObject struct {
ObjectType `json:",inline"`
ActionObjectSelector `json:",inline"`
}
ActionObject contains object selector options for an action.
func (*ActionObject) DeepCopy ¶ added in v0.2.5
func (in *ActionObject) DeepCopy() *ActionObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionObject.
func (*ActionObject) DeepCopyInto ¶ added in v0.2.5
func (in *ActionObject) DeepCopyInto(out *ActionObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionObjectSelector ¶ added in v0.2.5
type ActionObjectSelector struct {
ObjectName `json:",inline"`
// Selector defines labels selector.
// +optional
Selector Expression `json:"selector,omitempty"`
}
ActionObjectSelector contains object selector options for an action. +kubebuilder:not:={required:{name,selector}}
func (*ActionObjectSelector) DeepCopy ¶ added in v0.2.5
func (in *ActionObjectSelector) DeepCopy() *ActionObjectSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionObjectSelector.
func (*ActionObjectSelector) DeepCopyInto ¶ added in v0.2.5
func (in *ActionObjectSelector) DeepCopyInto(out *ActionObjectSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionOutputs ¶ added in v0.2.5
type ActionOutputs struct {
// Outputs defines output bindings.
// +optional
Outputs []Output `json:"outputs,omitempty"`
}
ActionOutputs contains outputs options for an action.
func (*ActionOutputs) DeepCopy ¶ added in v0.2.5
func (in *ActionOutputs) DeepCopy() *ActionOutputs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionOutputs.
func (*ActionOutputs) DeepCopyInto ¶ added in v0.2.5
func (in *ActionOutputs) DeepCopyInto(out *ActionOutputs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionResourceRef ¶ added in v0.2.5
type ActionResourceRef struct {
FileRef `json:",inline"`
// Resource provides a resource to be applied.
// +kubebuilder:validation:XEmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
// +optional
Resource *unstructured.Unstructured `json:"resource,omitempty"`
// Template determines whether resources should be considered for templating.
// +optional
Template *bool `json:"template,omitempty"`
}
ActionResourceRef contains resource reference options for an action. +kubebuilder:not:={required:{file,resource}}
func (*ActionResourceRef) DeepCopy ¶ added in v0.2.5
func (in *ActionResourceRef) DeepCopy() *ActionResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionResourceRef.
func (*ActionResourceRef) DeepCopyInto ¶ added in v0.2.5
func (in *ActionResourceRef) DeepCopyInto(out *ActionResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionTimeout ¶ added in v0.2.5
type ActionTimeout struct {
// Timeout for the operation. Overrides the global timeout set in the Configuration.
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
}
ActionTimeout contains timeout options for an action.
func (*ActionTimeout) DeepCopy ¶ added in v0.2.5
func (in *ActionTimeout) DeepCopy() *ActionTimeout
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTimeout.
func (*ActionTimeout) DeepCopyInto ¶ added in v0.2.5
func (in *ActionTimeout) DeepCopyInto(out *ActionTimeout)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Apply ¶
type Apply struct {
ActionBindings `json:",inline"`
ActionClusters `json:",inline"`
ActionDryRun `json:",inline"`
ActionExpectations `json:",inline"`
ActionOutputs `json:",inline"`
ActionResourceRef `json:",inline"`
ActionTimeout `json:",inline"`
}
Apply represents a set of configurations or resources that should be applied during testing.
func (*Apply) DeepCopy ¶
func (in *Apply) DeepCopy() *Apply
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Apply.
func (*Apply) DeepCopyInto ¶
func (in *Apply) DeepCopyInto(out *Apply)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Assert ¶
type Assert struct {
ActionBindings `json:",inline"`
ActionCheckRef `json:",inline"`
ActionClusters `json:",inline"`
ActionTimeout `json:",inline"`
}
Assert represents a test condition that is expected to hold true during the testing process.
func (*Assert) DeepCopy ¶
func (in *Assert) DeepCopy() *Assert
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Assert.
func (*Assert) DeepCopyInto ¶
func (in *Assert) DeepCopyInto(out *Assert)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Binding ¶ added in v0.1.7
type Binding struct {
// Name the name of the binding.
// +kubebuilder:validation:Type:=string
// +kubebuilder:validation:Pattern:=`^(?:\w+|\(.+\))$`
Name Expression `json:"name"`
// Compiler defines the default compiler to use when evaluating expressions.
// +optional
Compiler *Compiler `json:"compiler,omitempty"`
// Value value of the binding.
Value Projection `json:"value"`
}
Binding represents a key/value set as a binding in an executing test.
func (*Binding) DeepCopy ¶ added in v0.1.7
func (in *Binding) DeepCopy() *Binding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Binding.
func (*Binding) DeepCopyInto ¶ added in v0.1.7
func (in *Binding) DeepCopyInto(out *Binding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CatchFinally ¶ added in v0.2.4
type CatchFinally struct {
// Description contains a description of the operation.
// +optional
Description string `json:"description,omitempty"`
// Compiler defines the default compiler to use when evaluating expressions.
// +optional
Compiler *Compiler `json:"compiler,omitempty"`
// PodLogs determines the pod logs collector to execute.
// +optional
PodLogs *PodLogs `json:"podLogs,omitempty"`
// Events determines the events collector to execute.
// +optional
Events *Events `json:"events,omitempty"`
// Describe determines the resource describe collector to execute.
// +optional
Describe *Describe `json:"describe,omitempty"`
// Wait determines the resource wait collector to execute.
// +optional
Wait *Wait `json:"wait,omitempty"`
// Get determines the resource get collector to execute.
// +optional
Get *Get `json:"get,omitempty"`
// Delete represents a deletion operation.
// +optional
Delete *Delete `json:"delete,omitempty"`
// Command defines a command to run.
// +optional
Command *Command `json:"command,omitempty"`
// Script defines a script to run.
// +optional
Script *Script `json:"script,omitempty"`
// Sleep defines zzzz.
// +optional
Sleep *Sleep `json:"sleep,omitempty"`
}
CatchFinally defines actions to be executed in catch, finally and cleanup blocks. +kubebuilder:oneOf:={required:{command}} +kubebuilder:oneOf:={required:{delete}} +kubebuilder:oneOf:={required:{describe}} +kubebuilder:oneOf:={required:{events}} +kubebuilder:oneOf:={required:{get}} +kubebuilder:oneOf:={required:{podLogs}} +kubebuilder:oneOf:={required:{script}} +kubebuilder:oneOf:={required:{sleep}} +kubebuilder:oneOf:={required:{wait}}
func (*CatchFinally) DeepCopy ¶ added in v0.2.4
func (in *CatchFinally) DeepCopy() *CatchFinally
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatchFinally.
func (*CatchFinally) DeepCopyInto ¶ added in v0.2.4
func (in *CatchFinally) DeepCopyInto(out *CatchFinally)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Check ¶ added in v0.0.7
type Check = v1alpha1.AssertionTree
Check represents a check to be applied on the result of an operation.
type Cluster ¶ added in v0.1.5
type Cluster struct {
// Kubeconfig is the path to the referenced file.
Kubeconfig string `json:"kubeconfig"`
// Context is the name of the context to use.
// +optional
Context string `json:"context,omitempty"`
}
Cluster defines cluster config and context.
func (*Cluster) DeepCopy ¶ added in v0.1.5
func (in *Cluster) DeepCopy() *Cluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶ added in v0.1.5
func (in *Cluster) DeepCopyInto(out *Cluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Clusters ¶ added in v0.2.4
type Clusters map[string]Cluster
Clusters defines a cluster map.
func (Clusters) DeepCopy ¶ added in v0.2.4
func (in Clusters) DeepCopy() Clusters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Clusters.
func (Clusters) DeepCopyInto ¶ added in v0.2.4
func (in Clusters) DeepCopyInto(out *Clusters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Command ¶ added in v0.0.2
type Command struct {
ActionBindings `json:",inline"`
ActionCheck `json:",inline"`
ActionClusters `json:",inline"`
ActionEnv `json:",inline"`
ActionOutputs `json:",inline"`
ActionTimeout `json:",inline"`
// Entrypoint is the command entry point to run.
Entrypoint string `json:"entrypoint"`
// Args is the command arguments.
// +optional
Args []string `json:"args,omitempty"`
// WorkDir is the working directory for command.
// +optional
WorkDir *string `json:"workDir,omitempty"`
}
Command describes a command to run as a part of a test step.
func (*Command) DeepCopy ¶ added in v0.0.2
func (in *Command) DeepCopy() *Command
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Command.
func (*Command) DeepCopyInto ¶ added in v0.0.2
func (in *Command) DeepCopyInto(out *Command)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Configuration ¶
type Configuration struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// Configuration spec.
Spec ConfigurationSpec `json:"spec"`
}
Configuration is the resource that contains the configuration used to run tests.
func (*Configuration) DeepCopy ¶
func (in *Configuration) DeepCopy() *Configuration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (*Configuration) DeepCopyInto ¶
func (in *Configuration) DeepCopyInto(out *Configuration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Configuration) DeepCopyObject ¶
func (in *Configuration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigurationSpec ¶
type ConfigurationSpec struct {
// Global timeouts configuration. Applies to all tests/test steps if not overridden.
// +optional
// +kubebuilder:default:={}
Timeouts DefaultTimeouts `json:"timeouts"`
// If set, do not delete the resources after running the tests (implies SkipClusterDelete).
// +optional
SkipDelete bool `json:"skipDelete,omitempty"`
// Template determines whether resources should be considered for templating.
// +optional
// +kubebuilder:default:=true
Template bool `json:"template"`
// Compiler defines the default compiler to use when evaluating expressions.
// +optional
Compiler *Compiler `json:"compiler,omitempty"`
// FailFast determines whether the test should stop upon encountering the first failure.
// +optional
FailFast bool `json:"failFast,omitempty"`
// The maximum number of tests to run at once.
// +kubebuilder:validation:Format:=int
// +kubebuilder:validation:Minimum:=1
// +optional
Parallel *int `json:"parallel,omitempty"`
// DeletionPropagationPolicy decides if a deletion will propagate to the dependents of
// the object, and how the garbage collector will handle the propagation.
// +optional
// +kubebuilder:validation:Enum:=Orphan;Background;Foreground
// +kubebuilder:default:=Background
DeletionPropagationPolicy metav1.DeletionPropagation `json:"deletionPropagationPolicy,omitempty"`
// ReportFormat determines test report format (JSON|XML|JUNIT-TEST|JUNIT-STEP|JUNIT-OPERATION|nil) nil == no report.
// maps to report.Type, however we don't want generated.deepcopy to have reference to it.
// +optional
// +kubebuilder:validation:Enum:=JSON;XML;JUNIT-TEST;JUNIT-STEP;JUNIT-OPERATION;
ReportFormat ReportFormatType `json:"reportFormat,omitempty"`
// ReportPath defines the path.
// +optional
ReportPath string `json:"reportPath,omitempty"`
// ReportName defines the name of report to create. It defaults to "chainsaw-report".
// +optional
// +kubebuilder:default:="chainsaw-report"
ReportName string `json:"reportName,omitempty"`
// Namespace defines the namespace to use for tests.
// If not specified, every test will execute in a random ephemeral namespace
// unless the namespace is overridden in a the test spec.
// +optional
Namespace string `json:"namespace,omitempty"`
// NamespaceTemplateCompiler defines the default compiler to use when evaluating expressions.
// +optional
NamespaceTemplateCompiler *Compiler `json:"namespaceTemplateCompiler,omitempty"`
// NamespaceTemplate defines a template to create the test namespace.
// +optional
NamespaceTemplate *Projection `json:"namespaceTemplate,omitempty"`
// FullName makes use of the full test case folder path instead of the folder name.
// +optional
FullName bool `json:"fullName,omitempty"`
// ExcludeTestRegex is used to exclude tests based on a regular expression.
// +optional
ExcludeTestRegex string `json:"excludeTestRegex,omitempty"`
// IncludeTestRegex is used to include tests based on a regular expression.
// +optional
IncludeTestRegex string `json:"includeTestRegex,omitempty"`
// RepeatCount indicates how many times the tests should be executed.
// +kubebuilder:validation:Format:=int
// +kubebuilder:validation:Minimum:=1
// +optional
RepeatCount *int `json:"repeatCount,omitempty"`
// TestFile is the name of the file containing the test to run.
// If no extension is provided, chainsaw will try with .yaml first and .yml if needed.
// +kubebuilder:default:="chainsaw-test"
// +optional
TestFile string `json:"testFile,omitempty"`
// ForceTerminationGracePeriod forces the termination grace period on pods, statefulsets, daemonsets and deployments.
// +optional
ForceTerminationGracePeriod *metav1.Duration `json:"forceTerminationGracePeriod,omitempty"`
// DelayBeforeCleanup adds a delay between the time a test ends and the time cleanup starts.
// +optional
DelayBeforeCleanup *metav1.Duration `json:"delayBeforeCleanup,omitempty"`
// Clusters holds a registry to clusters to support multi-cluster tests.
// +optional
Clusters Clusters `json:"clusters,omitempty"`
// Catch defines what the tests steps will execute when an error happens.
// This will be combined with catch handlers defined at the test and step levels.
// +optional
Catch []CatchFinally `json:"catch,omitempty"`
}
ConfigurationSpec contains the configuration used to run tests.
func (*ConfigurationSpec) DeepCopy ¶
func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec.
func (*ConfigurationSpec) DeepCopyInto ¶
func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Create ¶ added in v0.0.4
type Create struct {
ActionBindings `json:",inline"`
ActionClusters `json:",inline"`
ActionDryRun `json:",inline"`
ActionExpectations `json:",inline"`
ActionOutputs `json:",inline"`
ActionResourceRef `json:",inline"`
ActionTimeout `json:",inline"`
}
Create represents a set of resources that should be created. If a resource already exists in the cluster it will fail.
func (*Create) DeepCopy ¶ added in v0.0.4
func (in *Create) DeepCopy() *Create
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Create.
func (*Create) DeepCopyInto ¶ added in v0.0.4
func (in *Create) DeepCopyInto(out *Create)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DefaultTimeouts ¶ added in v0.2.8
type DefaultTimeouts struct {
// Apply defines the timeout for the apply operation
// +optional
// +kubebuilder:default:="5s"
Apply metav1.Duration `json:"apply"`
// Assert defines the timeout for the assert operation
// +optional
// +kubebuilder:default:="30s"
Assert metav1.Duration `json:"assert"`
// Cleanup defines the timeout for the cleanup operation
// +optional
// +kubebuilder:default:="30s"
Cleanup metav1.Duration `json:"cleanup"`
// Delete defines the timeout for the delete operation
// +optional
// +kubebuilder:default:="15s"
Delete metav1.Duration `json:"delete"`
// Error defines the timeout for the error operation
// +optional
// +kubebuilder:default:="30s"
Error metav1.Duration `json:"error"`
// Exec defines the timeout for exec operations
// +optional
// +kubebuilder:default:="5s"
Exec metav1.Duration `json:"exec"`
}
DefaultTimeouts contains defautl timeouts per operation.
func (DefaultTimeouts) Combine ¶ added in v0.2.8
func (t DefaultTimeouts) Combine(override *Timeouts) DefaultTimeouts
func (*DefaultTimeouts) DeepCopy ¶ added in v0.2.8
func (in *DefaultTimeouts) DeepCopy() *DefaultTimeouts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultTimeouts.
func (*DefaultTimeouts) DeepCopyInto ¶ added in v0.2.8
func (in *DefaultTimeouts) DeepCopyInto(out *DefaultTimeouts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Delete ¶
type Delete struct {
ActionBindings `json:",inline"`
ActionClusters `json:",inline"`
ActionExpectations `json:",inline"`
ActionTimeout `json:",inline"`
// Template determines whether resources should be considered for templating.
// +optional
Template *bool `json:"template,omitempty"`
// File is the path to the referenced file. This can be a direct path to a file
// or an expression that matches multiple files, such as "manifest/*.yaml" for all YAML
// files within the "manifest" directory.
// +optional
File Expression `json:"file,omitempty"`
// Ref determines objects to be deleted.
// +optional
Ref *ObjectReference `json:"ref,omitempty"`
// DeletionPropagationPolicy decides if a deletion will propagate to the dependents of
// the object, and how the garbage collector will handle the propagation.
// Overrides the deletion propagation policy set in the Configuration, the Test and the TestStep.
// +optional
// +kubebuilder:validation:Enum:=Orphan;Background;Foreground
DeletionPropagationPolicy *metav1.DeletionPropagation `json:"deletionPropagationPolicy,omitempty"`
}
Delete is a reference to an object that should be deleted +kubebuilder:not:={required:{file,ref}}
func (*Delete) DeepCopy ¶
func (in *Delete) DeepCopy() *Delete
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Delete.
func (*Delete) DeepCopyInto ¶
func (in *Delete) DeepCopyInto(out *Delete)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Describe ¶ added in v0.1.4
type Describe struct {
ActionClusters `json:",inline"`
ActionObject `json:",inline"`
ActionTimeout `json:",inline"`
// Show Events indicates whether to include related events.
// +optional
ShowEvents *bool `json:"showEvents,omitempty"`
}
Describe defines how to describe resources.
func (*Describe) DeepCopy ¶ added in v0.1.4
func (in *Describe) DeepCopy() *Describe
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Describe.
func (*Describe) DeepCopyInto ¶ added in v0.1.4
func (in *Describe) DeepCopyInto(out *Describe)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Error ¶
type Error struct {
ActionBindings `json:",inline"`
ActionCheckRef `json:",inline"`
ActionClusters `json:",inline"`
ActionTimeout `json:",inline"`
}
Error represents an anticipated error condition that may arise during testing. Instead of treating such an error as a test failure, it acknowledges it as expected.
func (*Error) DeepCopy ¶
func (in *Error) DeepCopy() *Error
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error.
func (*Error) DeepCopyInto ¶
func (in *Error) DeepCopyInto(out *Error)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Events ¶ added in v0.0.2
type Events struct {
ActionClusters `json:",inline"`
ActionFormat `json:",inline"`
ActionObjectSelector `json:",inline"`
ActionTimeout `json:",inline"`
}
Events defines how to collect events.
func (*Events) DeepCopy ¶ added in v0.0.2
func (in *Events) DeepCopy() *Events
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Events.
func (*Events) DeepCopyInto ¶ added in v0.0.2
func (in *Events) DeepCopyInto(out *Events)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Expectation ¶ added in v0.0.7
type Expectation struct {
// Match defines the matching statement.
// +optional
Match *Match `json:"match,omitempty"`
// Check defines the verification statement.
Check Check `json:"check"`
}
Expectation represents a check to be applied on the result of an operation with a match filter to determine if the verification should be considered.
func (*Expectation) DeepCopy ¶ added in v0.0.7
func (in *Expectation) DeepCopy() *Expectation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Expectation.
func (*Expectation) DeepCopyInto ¶ added in v0.0.7
func (in *Expectation) DeepCopyInto(out *Expectation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Expression ¶ added in v0.2.9
type Expression string
Expression defines an expression to be used in string fields.
func (*Expression) MarshalJSON ¶ added in v0.2.9
func (e *Expression) MarshalJSON() ([]byte, error)
func (*Expression) UnmarshalJSON ¶ added in v0.2.9
func (e *Expression) UnmarshalJSON(data []byte) error
type FileRef ¶
type FileRef struct {
// File is the path to the referenced file. This can be a direct path to a file
// or an expression that matches multiple files, such as "manifest/*.yaml" for all YAML
// files within the "manifest" directory.
File Expression `json:"file,omitempty"`
}
FileRef represents a file reference.
func (*FileRef) DeepCopy ¶
func (in *FileRef) DeepCopy() *FileRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileRef.
func (*FileRef) DeepCopyInto ¶
func (in *FileRef) DeepCopyInto(out *FileRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Format ¶ added in v0.1.5
type Format Expression
Format determines the output format (json or yaml). +kubebuilder:validation:Type:=string +kubebuilder:validation:Pattern:=`^(?:json|yaml|\(.+\))$`
type Get ¶ added in v0.1.5
type Get struct {
ActionClusters `json:",inline"`
ActionFormat `json:",inline"`
ActionObject `json:",inline"`
ActionTimeout `json:",inline"`
}
Get defines how to get resources.
func (*Get) DeepCopy ¶ added in v0.1.5
func (in *Get) DeepCopy() *Get
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Get.
func (*Get) DeepCopyInto ¶ added in v0.1.5
func (in *Get) DeepCopyInto(out *Get)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Match ¶ added in v0.1.4
type Match = v1alpha1.AssertionTree
Match represents a match condition against an evaluated object.
type ObjectName ¶ added in v0.2.5
type ObjectName struct {
// Namespace of the referent.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
// +optional
Namespace Expression `json:"namespace,omitempty"`
// Name of the referent.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
// +optional
Name Expression `json:"name,omitempty"`
}
ObjectName represents an object namespace and name.
func (*ObjectName) DeepCopy ¶ added in v0.2.5
func (in *ObjectName) DeepCopy() *ObjectName
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectName.
func (*ObjectName) DeepCopyInto ¶ added in v0.2.5
func (in *ObjectName) DeepCopyInto(out *ObjectName)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectReference ¶ added in v0.0.2
type ObjectReference struct {
ObjectType `json:",inline"`
ObjectName `json:",inline"`
// Label selector to match objects to delete
// +optional
Labels map[string]string `json:"labels,omitempty"`
}
ObjectReference represents one or more objects with a specific apiVersion and kind. For a single object name and namespace are used to identify the object. For multiple objects use labels.
func (*ObjectReference) DeepCopy ¶ added in v0.0.2
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶ added in v0.0.2
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectType ¶ added in v0.1.8
type ObjectType struct {
// API version of the referent.
APIVersion Expression `json:"apiVersion"`
// Kind of the referent.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind Expression `json:"kind"`
}
ObjectType represents a specific apiVersion and kind.
func (*ObjectType) DeepCopy ¶ added in v0.1.8
func (in *ObjectType) DeepCopy() *ObjectType
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectType.
func (*ObjectType) DeepCopyInto ¶ added in v0.1.8
func (in *ObjectType) DeepCopyInto(out *ObjectType)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Operation ¶ added in v0.0.4
type Operation struct {
// OperationBase defines common elements to all operations.
// +optional
OperationBase `json:",inline"`
// Apply represents resources that should be applied for this test step. This can include things
// like configuration settings or any other resources that need to be available during the test.
// +optional
Apply *Apply `json:"apply,omitempty"`
// Assert represents an assertion to be made. It checks whether the conditions specified in the assertion hold true.
// +optional
Assert *Assert `json:"assert,omitempty"`
// Command defines a command to run.
// +optional
Command *Command `json:"command,omitempty"`
// Create represents a creation operation.
// +optional
Create *Create `json:"create,omitempty"`
// Delete represents a deletion operation.
// +optional
Delete *Delete `json:"delete,omitempty"`
// Describe determines the resource describe collector to execute.
// +optional
Describe *Describe `json:"describe,omitempty"`
// Error represents the expected errors for this test step. If any of these errors occur, the test
// will consider them as expected; otherwise, they will be treated as test failures.
// +optional
Error *Error `json:"error,omitempty"`
// Events determines the events collector to execute.
// +optional
Events *Events `json:"events,omitempty"`
// Get determines the resource get collector to execute.
// +optional
Get *Get `json:"get,omitempty"`
// Patch represents a patch operation.
// +optional
Patch *Patch `json:"patch,omitempty"`
// PodLogs determines the pod logs collector to execute.
// +optional
PodLogs *PodLogs `json:"podLogs,omitempty"`
// Proxy runs a proxy request.
// +optional
Proxy *Proxy `json:"proxy,omitempty"`
// Script defines a script to run.
// +optional
Script *Script `json:"script,omitempty"`
// Sleep defines zzzz.
// +optional
Sleep *Sleep `json:"sleep,omitempty"`
// Update represents an update operation.
// +optional
Update *Update `json:"update,omitempty"`
// Wait determines the resource wait collector to execute.
// +optional
Wait *Wait `json:"wait,omitempty"`
}
Operation defines a single operation, only one action is permitted for a given operation. +kubebuilder:oneOf:={required:{apply}} +kubebuilder:oneOf:={required:{assert}} +kubebuilder:oneOf:={required:{command}} +kubebuilder:oneOf:={required:{create}} +kubebuilder:oneOf:={required:{delete}} +kubebuilder:oneOf:={required:{describe}} +kubebuilder:oneOf:={required:{error}} +kubebuilder:oneOf:={required:{events}} +kubebuilder:oneOf:={required:{patch}} +kubebuilder:oneOf:={required:{podLogs}} +kubebuilder:oneOf:={required:{proxy}} +kubebuilder:oneOf:={required:{script}} +kubebuilder:oneOf:={required:{sleep}} +kubebuilder:oneOf:={required:{update}} +kubebuilder:oneOf:={required:{wait}}
func (*Operation) DeepCopy ¶ added in v0.0.4
func (in *Operation) DeepCopy() *Operation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation.
func (*Operation) DeepCopyInto ¶ added in v0.0.4
func (in *Operation) DeepCopyInto(out *Operation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperationBase ¶ added in v0.2.3
type OperationBase struct {
// Description contains a description of the operation.
// +optional
Description string `json:"description,omitempty"`
// ContinueOnError determines whether a test should continue or not in case the operation was not successful.
// Even if the test continues executing, it will still be reported as failed.
// +optional
ContinueOnError *bool `json:"continueOnError,omitempty"`
// Compiler defines the default compiler to use when evaluating expressions.
// +optional
Compiler *Compiler `json:"compiler,omitempty"`
}
OperationBase defines common elements to all operations.
func (*OperationBase) DeepCopy ¶ added in v0.2.3
func (in *OperationBase) DeepCopy() *OperationBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationBase.
func (*OperationBase) DeepCopyInto ¶ added in v0.2.3
func (in *OperationBase) DeepCopyInto(out *OperationBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Output ¶ added in v0.1.9
type Output struct {
// Binding determines the binding to create when the match succeeds.
Binding `json:",inline"`
// Match defines the matching statement.
// +optional
Match *Match `json:"match,omitempty"`
}
Output represents an output binding with a match to determine if the binding must be considered or not.
func (*Output) DeepCopy ¶ added in v0.1.9
func (in *Output) DeepCopy() *Output
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Output.
func (*Output) DeepCopyInto ¶ added in v0.1.9
func (in *Output) DeepCopyInto(out *Output)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Patch ¶ added in v0.1.5
type Patch struct {
ActionBindings `json:",inline"`
ActionClusters `json:",inline"`
ActionDryRun `json:",inline"`
ActionExpectations `json:",inline"`
ActionOutputs `json:",inline"`
ActionResourceRef `json:",inline"`
ActionTimeout `json:",inline"`
}
Patch represents a set of resources that should be patched. If a resource doesn't exist yet in the cluster it will fail.
func (*Patch) DeepCopy ¶ added in v0.1.5
func (in *Patch) DeepCopy() *Patch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch.
func (*Patch) DeepCopyInto ¶ added in v0.1.5
func (in *Patch) DeepCopyInto(out *Patch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodLogs ¶ added in v0.0.2
type PodLogs struct {
ActionClusters `json:",inline"`
ActionObjectSelector `json:",inline"`
ActionTimeout `json:",inline"`
// Container in pod to get logs from else --all-containers is used.
// +optional
Container Expression `json:"container,omitempty"`
// Tail is the number of last lines to collect from pods. If omitted or zero,
// then the default is 10 if you use a selector, or -1 (all) if you use a pod name.
// This matches default behavior of `kubectl logs`.
// +optional
Tail *int `json:"tail,omitempty"`
}
PodLogs defines how to collect pod logs.
func (*PodLogs) DeepCopy ¶ added in v0.0.2
func (in *PodLogs) DeepCopy() *PodLogs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogs.
func (*PodLogs) DeepCopyInto ¶ added in v0.0.2
func (in *PodLogs) DeepCopyInto(out *PodLogs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Projection ¶ added in v0.2.11
type Projection struct {
// contains filtered or unexported fields
}
Projection can be any type. +k8s:deepcopy-gen=false +kubebuilder:validation:XPreserveUnknownFields +kubebuilder:validation:Type:=""
func NewProjection ¶ added in v0.2.11
func NewProjection(value any) Projection
func (*Projection) DeepCopyInto ¶ added in v0.2.11
func (in *Projection) DeepCopyInto(out *Projection)
func (*Projection) MarshalJSON ¶ added in v0.2.11
func (a *Projection) MarshalJSON() ([]byte, error)
func (*Projection) UnmarshalJSON ¶ added in v0.2.11
func (a *Projection) UnmarshalJSON(data []byte) error
type Proxy ¶ added in v0.2.6
type Proxy struct {
ActionClusters `json:",inline"`
ActionOutputs `json:",inline"`
ActionTimeout `json:",inline"`
ObjectName `json:",inline"`
ObjectType `json:",inline"`
// TargetPort defines the target port to proxy the request.
// +optional
TargetPort Expression `json:"port,omitempty"`
// TargetPath defines the target path to proxy the request.
// +optional
TargetPath Expression `json:"path,omitempty"`
}
Proxy defines how to get resources.
func (*Proxy) DeepCopy ¶ added in v0.2.6
func (in *Proxy) DeepCopy() *Proxy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy.
func (*Proxy) DeepCopyInto ¶ added in v0.2.6
func (in *Proxy) DeepCopyInto(out *Proxy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReportFormatType ¶
type ReportFormatType string
const (
JSONFormat ReportFormatType = "JSON"
XMLFormat ReportFormatType = "XML"
JUnitTestFormat ReportFormatType = "JUNIT-TEST"
JUnitStepFormat ReportFormatType = "JUNIT-STEP"
JUnitOperationFormat ReportFormatType = "JUNIT-OPERATION"
NoReport ReportFormatType = ""
)
type Scenario ¶ added in v0.2.5
type Scenario struct {
// Bindings defines binding key/values.
// +optional
Bindings []Binding `json:"bindings,omitempty"`
}
Scenario defines per scenario bindings.
func (*Scenario) DeepCopy ¶ added in v0.2.5
func (in *Scenario) DeepCopy() *Scenario
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scenario.
func (*Scenario) DeepCopyInto ¶ added in v0.2.5
func (in *Scenario) DeepCopyInto(out *Scenario)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Script ¶ added in v0.0.2
type Script struct {
ActionBindings `json:",inline"`
ActionCheck `json:",inline"`
ActionClusters `json:",inline"`
ActionEnv `json:",inline"`
ActionOutputs `json:",inline"`
ActionTimeout `json:",inline"`
// Content defines a shell script (run with "sh -c ...").
// +optional
Content string `json:"content,omitempty"`
// WorkDir is the working directory for script.
// +optional
WorkDir *string `json:"workDir,omitempty"`
}
Script describes a script to run as a part of a test step.
func (*Script) DeepCopy ¶ added in v0.0.2
func (in *Script) DeepCopy() *Script
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Script.
func (*Script) DeepCopyInto ¶ added in v0.0.2
func (in *Script) DeepCopyInto(out *Script)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Sleep ¶ added in v0.0.8
type Sleep struct {
// Duration is the delay used for sleeping.
Duration metav1.Duration `json:"duration"`
}
Sleep represents a duration while nothing happens.
func (*Sleep) DeepCopy ¶ added in v0.0.8
func (in *Sleep) DeepCopy() *Sleep
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sleep.
func (*Sleep) DeepCopyInto ¶ added in v0.0.8
func (in *Sleep) DeepCopyInto(out *Sleep)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StepTemplate ¶ added in v0.2.7
type StepTemplate struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// Test step spec.
Spec StepTemplateSpec `json:"spec"`
}
StepTemplate is the resource that contains a step definition.
func (*StepTemplate) DeepCopy ¶ added in v0.2.7
func (in *StepTemplate) DeepCopy() *StepTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepTemplate.
func (*StepTemplate) DeepCopyInto ¶ added in v0.2.7
func (in *StepTemplate) DeepCopyInto(out *StepTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StepTemplate) DeepCopyObject ¶ added in v0.2.7
func (in *StepTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StepTemplateSpec ¶ added in v0.2.7
type StepTemplateSpec struct {
// Bindings defines additional binding key/values.
// +optional
Bindings []Binding `json:"bindings,omitempty"`
// Try defines what the step will try to execute.
// +kubebuilder:validation:MinItems:=1
Try []Operation `json:"try"`
// Catch defines what the step will execute when an error happens.
// +optional
Catch []CatchFinally `json:"catch,omitempty"`
// Finally defines what the step will execute after the step is terminated.
// +optional
Finally []CatchFinally `json:"finally,omitempty"`
// Cleanup defines what will be executed after the test is terminated.
// +optional
Cleanup []CatchFinally `json:"cleanup,omitempty"`
}
StepTemplateSpec defines the spec of a step template.
func (*StepTemplateSpec) DeepCopy ¶ added in v0.2.7
func (in *StepTemplateSpec) DeepCopy() *StepTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepTemplateSpec.
func (*StepTemplateSpec) DeepCopyInto ¶ added in v0.2.7
func (in *StepTemplateSpec) DeepCopyInto(out *StepTemplateSpec)
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"`
// Standard object's metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// Test spec.
Spec TestSpec `json:"spec"`
}
Test is the resource that contains a test definition.
func (*Test) DeepCopy ¶
func (in *Test) DeepCopy() *Test
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (*Test) DeepCopyInto ¶
func (in *Test) DeepCopyInto(out *Test)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Test) DeepCopyObject ¶
func (in *Test) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestSpec ¶
type TestSpec struct {
// Description contains a description of the test.
// +optional
Description string `json:"description,omitempty"`
// FailFast determines whether the test should stop upon encountering the first failure.
// +optional
FailFast *bool `json:"failFast,omitempty"`
// Timeouts for the test. Overrides the global timeouts set in the Configuration on a per operation basis.
// +optional
Timeouts *Timeouts `json:"timeouts,omitempty"`
// Cluster defines the target cluster (will be inherited if not specified).
// +optional
Cluster *string `json:"cluster,omitempty"`
// Clusters holds a registry to clusters to support multi-cluster tests.
// +optional
Clusters Clusters `json:"clusters,omitempty"`
// Skip determines whether the test should skipped.
// +optional
Skip *bool `json:"skip,omitempty"`
// Concurrent determines whether the test should run concurrently with other tests.
// +optional
Concurrent *bool `json:"concurrent,omitempty"`
// SkipDelete determines whether the resources created by the test should be deleted after the test is executed.
// +optional
SkipDelete *bool `json:"skipDelete,omitempty"`
// Template determines whether resources should be considered for templating.
// +optional
Template *bool `json:"template,omitempty"`
// Compiler defines the default compiler to use when evaluating expressions.
// +optional
Compiler *Compiler `json:"compiler,omitempty"`
// Namespace determines whether the test should run in a random ephemeral namespace or not.
// +optional
Namespace string `json:"namespace,omitempty"`
// NamespaceTemplate defines a template to create the test namespace.
// +optional
NamespaceTemplate *Projection `json:"namespaceTemplate,omitempty"`
// NamespaceTemplateCompiler defines the default compiler to use when evaluating expressions.
// +optional
NamespaceTemplateCompiler *Compiler `json:"namespaceTemplateCompiler,omitempty"`
// Scenarios defines test scenarios.
// +optional
Scenarios []Scenario `json:"scenarios,omitempty"`
// Bindings defines additional binding key/values.
// +optional
Bindings []Binding `json:"bindings,omitempty"`
// Steps defining the test.
Steps []TestStep `json:"steps"`
// Catch defines what the steps will execute when an error happens.
// This will be combined with catch handlers defined at the step level.
// +optional
Catch []CatchFinally `json:"catch,omitempty"`
// ForceTerminationGracePeriod forces the termination grace period on pods, statefulsets, daemonsets and deployments.
// +optional
ForceTerminationGracePeriod *metav1.Duration `json:"forceTerminationGracePeriod,omitempty"`
// DelayBeforeCleanup adds a delay between the time a test ends and the time cleanup starts.
// +optional
DelayBeforeCleanup *metav1.Duration `json:"delayBeforeCleanup,omitempty"`
// DeletionPropagationPolicy decides if a deletion will propagate to the dependents of
// the object, and how the garbage collector will handle the propagation.
// Overrides the deletion propagation policy set in the Configuration.
// +optional
// +kubebuilder:validation:Enum:=Orphan;Background;Foreground
DeletionPropagationPolicy *metav1.DeletionPropagation `json:"deletionPropagationPolicy,omitempty"`
}
TestSpec contains the test spec.
func (*TestSpec) DeepCopy ¶
func (in *TestSpec) DeepCopy() *TestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSpec.
func (*TestSpec) DeepCopyInto ¶
func (in *TestSpec) DeepCopyInto(out *TestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestStep ¶
type TestStep struct {
// Name of the step.
// +optional
Name string `json:"name,omitempty"`
// Use defines a reference to a step template.
Use *Use `json:"use,omitempty"`
// TestStepSpec of the step.
TestStepSpec `json:",inline"`
}
TestStep contains the test step definition used in a test spec. +kubebuilder:not:={required:{use},anyOf:{{required:{try}},{required:{catch}},{required:{finally}},{required:{cleanup}}}}
func (*TestStep) DeepCopy ¶
func (in *TestStep) DeepCopy() *TestStep
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStep.
func (*TestStep) DeepCopyInto ¶
func (in *TestStep) DeepCopyInto(out *TestStep)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestStepSpec ¶
type TestStepSpec struct {
// Description contains a description of the test step.
// +optional
Description string `json:"description,omitempty"`
// Timeouts for the test step. Overrides the global timeouts set in the Configuration and the timeouts eventually set in the Test.
// +optional
Timeouts *Timeouts `json:"timeouts,omitempty"`
// DeletionPropagationPolicy decides if a deletion will propagate to the dependents of
// the object, and how the garbage collector will handle the propagation.
// Overrides the deletion propagation policy set in both the Configuration and the Test.
// +optional
// +kubebuilder:validation:Enum:=Orphan;Background;Foreground
DeletionPropagationPolicy *metav1.DeletionPropagation `json:"deletionPropagationPolicy,omitempty"`
// Cluster defines the target cluster (will be inherited if not specified).
// +optional
Cluster *string `json:"cluster,omitempty"`
// Clusters holds a registry to clusters to support multi-cluster tests.
// +optional
Clusters Clusters `json:"clusters,omitempty"`
// SkipDelete determines whether the resources created by the step should be deleted after the test step is executed.
// +optional
SkipDelete *bool `json:"skipDelete,omitempty"`
// Template determines whether resources should be considered for templating.
// +optional
Template *bool `json:"template,omitempty"`
// Compiler defines the default compiler to use when evaluating expressions.
// +optional
Compiler *Compiler `json:"compiler,omitempty"`
// Bindings defines additional binding key/values.
// +optional
Bindings []Binding `json:"bindings,omitempty"`
// Try defines what the step will try to execute.
// +kubebuilder:validation:MinItems:=1
// +optional
Try []Operation `json:"try"`
// Catch defines what the step will execute when an error happens.
// +optional
Catch []CatchFinally `json:"catch,omitempty"`
// Finally defines what the step will execute after the step is terminated.
// +optional
Finally []CatchFinally `json:"finally,omitempty"`
// Cleanup defines what will be executed after the test is terminated.
// +optional
Cleanup []CatchFinally `json:"cleanup,omitempty"`
}
TestStepSpec defines the desired state and behavior for each test step.
func (*TestStepSpec) DeepCopy ¶
func (in *TestStepSpec) DeepCopy() *TestStepSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStepSpec.
func (*TestStepSpec) DeepCopyInto ¶
func (in *TestStepSpec) DeepCopyInto(out *TestStepSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Timeouts ¶ added in v0.0.3
type Timeouts struct {
// Apply defines the timeout for the apply operation
Apply *metav1.Duration `json:"apply,omitempty"`
// Assert defines the timeout for the assert operation
Assert *metav1.Duration `json:"assert,omitempty"`
// Cleanup defines the timeout for the cleanup operation
Cleanup *metav1.Duration `json:"cleanup,omitempty"`
// Delete defines the timeout for the delete operation
Delete *metav1.Duration `json:"delete,omitempty"`
// Error defines the timeout for the error operation
Error *metav1.Duration `json:"error,omitempty"`
// Exec defines the timeout for exec operations
Exec *metav1.Duration `json:"exec,omitempty"`
}
Timeouts contains timeouts per operation.
func (*Timeouts) DeepCopy ¶ added in v0.0.3
func (in *Timeouts) DeepCopy() *Timeouts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timeouts.
func (*Timeouts) DeepCopyInto ¶ added in v0.0.3
func (in *Timeouts) DeepCopyInto(out *Timeouts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Update ¶ added in v0.1.9
type Update struct {
ActionBindings `json:",inline"`
ActionClusters `json:",inline"`
ActionDryRun `json:",inline"`
ActionExpectations `json:",inline"`
ActionOutputs `json:",inline"`
ActionResourceRef `json:",inline"`
ActionTimeout `json:",inline"`
}
Update represents a set of resources that should be updated. If a resource does not exist in the cluster it will fail.
func (*Update) DeepCopy ¶ added in v0.1.9
func (in *Update) DeepCopy() *Update
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Update.
func (*Update) DeepCopyInto ¶ added in v0.1.9
func (in *Update) DeepCopyInto(out *Update)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Use ¶ added in v0.2.7
type Use struct {
// Template references a step template.
Template string `json:"template"`
// With defines arguments passed to the step template.
// +optional
// +kubebuilder:default:={}
With With `json:"with"`
}
Use defines a reference to a step template.
func (*Use) DeepCopy ¶ added in v0.2.7
func (in *Use) DeepCopy() *Use
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Use.
func (*Use) DeepCopyInto ¶ added in v0.2.7
func (in *Use) DeepCopyInto(out *Use)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Wait ¶ added in v0.1.7
type Wait struct {
ActionTimeout `json:",inline"`
ActionFormat `json:",inline"`
ActionClusters `json:",inline"`
ActionObject `json:",inline"`
// WaitFor specifies the condition to wait for.
WaitFor `json:"for"`
}
Wait specifies how to perform wait operations on resources.
func (*Wait) DeepCopy ¶ added in v0.1.7
func (in *Wait) DeepCopy() *Wait
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Wait.
func (*Wait) DeepCopyInto ¶ added in v0.1.7
func (in *Wait) DeepCopyInto(out *Wait)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WaitFor ¶ added in v0.2.5
type WaitFor struct {
// Deletion specifies parameters for waiting on a resource's deletion.
// +optional
Deletion *WaitForDeletion `json:"deletion,omitempty"`
// Condition specifies the condition to wait for.
// +optional
Condition *WaitForCondition `json:"condition,omitempty"`
// JsonPath specifies the json path condition to wait for.
// +optional
JsonPath *WaitForJsonPath `json:"jsonPath,omitempty"`
}
WaitFor specifies the condition to wait for.
func (*WaitFor) DeepCopy ¶ added in v0.2.5
func (in *WaitFor) DeepCopy() *WaitFor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitFor.
func (*WaitFor) DeepCopyInto ¶ added in v0.2.5
func (in *WaitFor) DeepCopyInto(out *WaitFor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WaitForCondition ¶ added in v0.2.5
type WaitForCondition struct {
// Name defines the specific condition to wait for, e.g., "Available", "Ready".
Name Expression `json:"name"`
// Value defines the specific condition status to wait for, e.g., "True", "False".
// +optional
Value *Expression `json:"value,omitempty"`
}
WaitForCondition represents parameters for waiting on a specific condition of a resource.
func (*WaitForCondition) DeepCopy ¶ added in v0.2.5
func (in *WaitForCondition) DeepCopy() *WaitForCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitForCondition.
func (*WaitForCondition) DeepCopyInto ¶ added in v0.2.5
func (in *WaitForCondition) DeepCopyInto(out *WaitForCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WaitForDeletion ¶ added in v0.2.5
type WaitForDeletion struct{}
WaitForDeletion represents parameters for waiting on a resource's deletion.
func (*WaitForDeletion) DeepCopy ¶ added in v0.2.5
func (in *WaitForDeletion) DeepCopy() *WaitForDeletion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitForDeletion.
func (*WaitForDeletion) DeepCopyInto ¶ added in v0.2.5
func (in *WaitForDeletion) DeepCopyInto(out *WaitForDeletion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WaitForJsonPath ¶ added in v0.2.5
type WaitForJsonPath struct {
// Path defines the json path to wait for, e.g. '{.status.phase}'.
Path Expression `json:"path"`
// Value defines the expected value to wait for, e.g., "Running".
// +optional
Value *Expression `json:"value,omitempty"`
}
WaitForJsonPath represents parameters for waiting on a json path of a resource.
func (*WaitForJsonPath) DeepCopy ¶ added in v0.2.5
func (in *WaitForJsonPath) DeepCopy() *WaitForJsonPath
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitForJsonPath.
func (*WaitForJsonPath) DeepCopyInto ¶ added in v0.2.5
func (in *WaitForJsonPath) DeepCopyInto(out *WaitForJsonPath)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type With ¶ added in v0.2.10
type With struct {
// Bindings defines additional binding key/values.
// +optional
Bindings []Binding `json:"bindings,omitempty"`
}
With defines arguments passed to step templates.
func (*With) DeepCopy ¶ added in v0.2.10
func (in *With) DeepCopy() *With
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new With.
func (*With) DeepCopyInto ¶ added in v0.2.10
func (in *With) DeepCopyInto(out *With)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.