Documentation
¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the v1alpha2 API group. +k8s:deepcopy-gen=package +k8s:conversion-gen=github.com/kyverno/chainsaw/pkg/apis/v1alpha1 +kubebuilder:object:generate=true +groupName=chainsaw.kyverno.io
Index ¶
- Constants
- Variables
- func Convert_v1alpha1_ConfigurationSpec_To_v1alpha2_ConfigurationSpec(in *v1alpha1.ConfigurationSpec, out *ConfigurationSpec, _ conversion.Scope) error
- func Convert_v1alpha1_Configuration_To_v1alpha2_Configuration(in *v1alpha1.Configuration, out *Configuration, s conversion.Scope) error
- func Convert_v1alpha1_TestSpec_To_v1alpha2_TestSpec(in *v1alpha1.TestSpec, out *TestSpec, s conversion.Scope) error
- func Convert_v1alpha1_Test_To_v1alpha2_Test(in *v1alpha1.Test, out *Test, s conversion.Scope) error
- func Convert_v1alpha2_ConfigurationSpec_To_v1alpha1_ConfigurationSpec(in *ConfigurationSpec, out *v1alpha1.ConfigurationSpec, _ conversion.Scope) error
- func Convert_v1alpha2_Configuration_To_v1alpha1_Configuration(in *Configuration, out *v1alpha1.Configuration, s conversion.Scope) error
- func Convert_v1alpha2_TestSpec_To_v1alpha1_TestSpec(in *TestSpec, out *v1alpha1.TestSpec, s conversion.Scope) error
- func Convert_v1alpha2_Test_To_v1alpha1_Test(in *Test, out *v1alpha1.Test, s conversion.Scope) error
- func RegisterConversions(s *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- type Any
- type Binding
- type Catch
- type CleanupOptions
- type Cluster
- type Clusters
- type Configuration
- type ConfigurationSpec
- type DeletionOptions
- type DiscoveryOptions
- type ErrorOptions
- type ExecutionOptions
- type NamespaceOptions
- type ReportFormatType
- type ReportOptions
- type TemplatingOptions
- type Test
- type TestExecutionOptions
- type TestSpec
- type TestStep
- type Timeouts
Constants ¶
const GroupName = "chainsaw.kyverno.io"
GroupName specifies the group name used to register the objects.
Variables ¶
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: "v1alpha2"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Convert_v1alpha1_ConfigurationSpec_To_v1alpha2_ConfigurationSpec ¶
func Convert_v1alpha1_ConfigurationSpec_To_v1alpha2_ConfigurationSpec(in *v1alpha1.ConfigurationSpec, out *ConfigurationSpec, _ conversion.Scope) error
func Convert_v1alpha1_Configuration_To_v1alpha2_Configuration ¶
func Convert_v1alpha1_Configuration_To_v1alpha2_Configuration(in *v1alpha1.Configuration, out *Configuration, s conversion.Scope) error
Convert_v1alpha1_Configuration_To_v1alpha2_Configuration is an autogenerated conversion function.
func Convert_v1alpha1_TestSpec_To_v1alpha2_TestSpec ¶ added in v0.2.4
func Convert_v1alpha1_Test_To_v1alpha2_Test ¶ added in v0.2.4
Convert_v1alpha1_Test_To_v1alpha2_Test is an autogenerated conversion function.
func Convert_v1alpha2_ConfigurationSpec_To_v1alpha1_ConfigurationSpec ¶
func Convert_v1alpha2_ConfigurationSpec_To_v1alpha1_ConfigurationSpec(in *ConfigurationSpec, out *v1alpha1.ConfigurationSpec, _ conversion.Scope) error
func Convert_v1alpha2_Configuration_To_v1alpha1_Configuration ¶
func Convert_v1alpha2_Configuration_To_v1alpha1_Configuration(in *Configuration, out *v1alpha1.Configuration, s conversion.Scope) error
Convert_v1alpha2_Configuration_To_v1alpha1_Configuration is an autogenerated conversion function.
func Convert_v1alpha2_TestSpec_To_v1alpha1_TestSpec ¶ added in v0.2.4
func Convert_v1alpha2_Test_To_v1alpha1_Test ¶ added in v0.2.4
Convert_v1alpha2_Test_To_v1alpha1_Test is an autogenerated conversion function.
func RegisterConversions ¶
RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Catch ¶
type Catch = v1alpha1.CatchFinally
type CleanupOptions ¶ added in v0.2.4
type CleanupOptions struct { // If set, do not delete the resources after running a test. // +optional SkipDelete bool `json:"skipDelete,omitempty"` // DelayBeforeCleanup adds a delay between the time a test ends and the time cleanup starts. // +optional DelayBeforeCleanup *metav1.Duration `json:"delayBeforeCleanup,omitempty"` }
CleanupOptions contains the configuration used for cleaning up resources.
func (*CleanupOptions) DeepCopy ¶ added in v0.2.4
func (in *CleanupOptions) DeepCopy() *CleanupOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CleanupOptions.
func (*CleanupOptions) DeepCopyInto ¶ added in v0.2.4
func (in *CleanupOptions) DeepCopyInto(out *CleanupOptions)
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 { // Cleanup contains cleanup configuration. // +optional Cleanup *CleanupOptions `json:"cleanup,omitempty"` // Clusters holds a registry to clusters to support multi-cluster tests. // +optional Clusters Clusters `json:"clusters,omitempty"` // Deletion contains the global deletion configuration. // +optional // +kubebuilder:default:={} Deletion DeletionOptions `json:"deletion,omitempty"` // Discovery contains tests discovery configuration. // +optional // +kubebuilder:default:={} Discovery DiscoveryOptions `json:"discovery"` // Error contains the global error configuration. // +optional Error *ErrorOptions `json:"error,omitempty"` // Execution contains tests execution configuration. // +optional Execution *ExecutionOptions `json:"execution,omitempty"` // Namespace contains properties for the namespace to use for tests. // +optional Namespace *NamespaceOptions `json:"namespace,omitempty"` // Report contains properties for the report. // +optional Report *ReportOptions `json:"report,omitempty"` // Templating contains the templating config. // +optional // +kubebuilder:default:={} Templating TemplatingOptions `json:"templating"` // Global timeouts configuration. Applies to all tests/test steps if not overridden. // +optional Timeouts Timeouts `json:"timeouts"` }
ConfigurationSpec contains the configuration used to run tests. +k8s:conversion-gen=false
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 DeletionOptions ¶ added in v0.2.3
type DeletionOptions struct { // Propagation 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 Propagation metav1.DeletionPropagation `json:"propagation,omitempty"` }
DeletionOptions contains the configuration used for deleting resources.
func (*DeletionOptions) DeepCopy ¶ added in v0.2.3
func (in *DeletionOptions) DeepCopy() *DeletionOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeletionOptions.
func (*DeletionOptions) DeepCopyInto ¶ added in v0.2.3
func (in *DeletionOptions) DeepCopyInto(out *DeletionOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiscoveryOptions ¶ added in v0.2.4
type DiscoveryOptions struct { // 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"` // 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. // +optional // +kubebuilder:default:="chainsaw-test" TestFile string `json:"testFile,omitempty"` // FullName makes use of the full test case folder path instead of the folder name. // +optional FullName bool `json:"fullName,omitempty"` }
DiscoveryOptions contains the discovery configuration used when discovering tests in folders.
func (*DiscoveryOptions) DeepCopy ¶ added in v0.2.4
func (in *DiscoveryOptions) DeepCopy() *DiscoveryOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryOptions.
func (*DiscoveryOptions) DeepCopyInto ¶ added in v0.2.4
func (in *DiscoveryOptions) DeepCopyInto(out *DiscoveryOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ErrorOptions ¶ added in v0.2.3
type ErrorOptions struct { // 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 []Catch `json:"catch,omitempty"` }
ErrorOptions contains the global error configuration.
func (*ErrorOptions) DeepCopy ¶ added in v0.2.3
func (in *ErrorOptions) DeepCopy() *ErrorOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ErrorOptions.
func (*ErrorOptions) DeepCopyInto ¶ added in v0.2.3
func (in *ErrorOptions) DeepCopyInto(out *ErrorOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionOptions ¶ added in v0.2.4
type ExecutionOptions struct { // 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"` // RepeatCount indicates how many times the tests should be executed. // +kubebuilder:validation:Format:=int // +kubebuilder:validation:Minimum:=1 // +optional RepeatCount *int `json:"repeatCount,omitempty"` // ForceTerminationGracePeriod forces the termination grace period on pods, statefulsets, daemonsets and deployments. // +optional ForceTerminationGracePeriod *metav1.Duration `json:"forceTerminationGracePeriod,omitempty"` }
ExecutionOptions determines how tests are run.
func (*ExecutionOptions) DeepCopy ¶ added in v0.2.4
func (in *ExecutionOptions) DeepCopy() *ExecutionOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionOptions.
func (*ExecutionOptions) DeepCopyInto ¶ added in v0.2.4
func (in *ExecutionOptions) DeepCopyInto(out *ExecutionOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceOptions ¶ added in v0.2.4
type NamespaceOptions struct { // Name 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 Name string `json:"name,omitempty"` // Template defines a template to create the test namespace. // +optional Template *Any `json:"template,omitempty"` }
NamespaceOptions contains the configuration used to allocate a namespace for each test.
func (*NamespaceOptions) DeepCopy ¶ added in v0.2.4
func (in *NamespaceOptions) DeepCopy() *NamespaceOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceOptions.
func (*NamespaceOptions) DeepCopyInto ¶ added in v0.2.4
func (in *NamespaceOptions) DeepCopyInto(out *NamespaceOptions)
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" )
type ReportOptions ¶ added in v0.2.4
type ReportOptions struct { // ReportFormat determines test report format (JSON|XML). // +optional // +kubebuilder:validation:Enum:=JSON;XML // +kubebuilder:default:="JSON" Format ReportFormatType `json:"format,omitempty"` // ReportPath defines the path. // +optional Path string `json:"path,omitempty"` // ReportName defines the name of report to create. It defaults to "chainsaw-report". // +optional // +kubebuilder:default:="chainsaw-report" Name string `json:"name,omitempty"` }
ReportOptions contains the configuration used for reporting.
func (*ReportOptions) DeepCopy ¶ added in v0.2.4
func (in *ReportOptions) DeepCopy() *ReportOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReportOptions.
func (*ReportOptions) DeepCopyInto ¶ added in v0.2.4
func (in *ReportOptions) DeepCopyInto(out *ReportOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplatingOptions ¶ added in v0.2.4
type TemplatingOptions struct { // Enabled determines whether resources should be considered for templating. // +optional // +kubebuilder:default:=true Enabled bool `json:"enabled,omitempty"` }
TemplatingOptions contains the templating configuration.
func (*TemplatingOptions) DeepCopy ¶ added in v0.2.4
func (in *TemplatingOptions) DeepCopy() *TemplatingOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplatingOptions.
func (*TemplatingOptions) DeepCopyInto ¶ added in v0.2.4
func (in *TemplatingOptions) DeepCopyInto(out *TemplatingOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Test ¶ added in v0.2.4
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 ¶ added in v0.2.4
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (*Test) DeepCopyInto ¶ added in v0.2.4
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Test) DeepCopyObject ¶ added in v0.2.4
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestExecutionOptions ¶ added in v0.2.4
type TestExecutionOptions struct { // Concurrent determines whether the test should run concurrently with other tests. // +optional // +kubebuilder:default:=true Concurrent bool `json:"concurrent"` // Skip determines whether the test should skipped. // +optional Skip bool `json:"skip,omitempty"` // TerminationGracePeriod forces the termination grace period on pods, statefulsets, daemonsets and deployments. // +optional TerminationGracePeriod *metav1.Duration `json:"terminationGracePeriod,omitempty"` }
TestExecutionOptions determines how tests are run.
func (*TestExecutionOptions) DeepCopy ¶ added in v0.2.4
func (in *TestExecutionOptions) DeepCopy() *TestExecutionOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecutionOptions.
func (*TestExecutionOptions) DeepCopyInto ¶ added in v0.2.4
func (in *TestExecutionOptions) DeepCopyInto(out *TestExecutionOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestSpec ¶ added in v0.2.4
type TestSpec struct { // Cleanup contains cleanup configuration. // +optional // +kubebuilder:default:={} Cleanup CleanupOptions `json:"cleanup"` // Cluster defines the target cluster (default cluster will be used if not specified and/or overridden). // +optional Cluster string `json:"cluster,omitempty"` // Clusters holds a registry to clusters to support multi-cluster tests. // +optional Clusters Clusters `json:"clusters,omitempty"` // Execution contains tests execution configuration. // +optional // +kubebuilder:default:={} Execution TestExecutionOptions `json:"execution"` // Bindings defines additional binding key/values. // +optional Bindings []Binding `json:"bindings,omitempty"` // Deletion contains the global deletion configuration. // +optional // +kubebuilder:default:={} Deletion DeletionOptions `json:"deletion"` // Description contains a description of the test. // +optional Description string `json:"description,omitempty"` // Error contains the global error configuration. // +optional // +kubebuilder:default:={} Error ErrorOptions `json:"error"` // Namespace contains properties for the namespace to use for tests. // +optional // +kubebuilder:default:={} Namespace NamespaceOptions `json:"namespace"` // Steps defining the test. Steps []TestStep `json:"steps"` // Templating contains the templating config. // +optional // +kubebuilder:default:={} Templating TemplatingOptions `json:"templating"` // Timeouts for the test. Overrides the global timeouts set in the Configuration on a per operation basis. // +optional // +kubebuilder:default:={} Timeouts Timeouts `json:"timeouts"` }
TestSpec contains the test spec. +k8s:conversion-gen=false
func (*TestSpec) DeepCopy ¶ added in v0.2.4
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSpec.
func (*TestSpec) DeepCopyInto ¶ added in v0.2.4
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.