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_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 RegisterConversions(s *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- type Any
- type Catch
- type Cleanup
- type Cluster
- type Clusters
- type Configuration
- type ConfigurationSpec
- type DeletionOptions
- type Discovery
- type ErrorOptions
- type Execution
- type Namespace
- type Report
- type ReportFormatType
- type Templating
- 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_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 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 Cleanup ¶
type Cleanup 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"` }
Cleanup options contain the configuration used for cleaning up resources.
func (*Cleanup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cleanup.
func (*Cleanup) DeepCopyInto ¶
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 *Cleanup `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 Discovery `json:"discovery"` // Error contains the global error configuration. // +optional Error *ErrorOptions `json:"error,omitempty"` // Execution contains tests execution configuration. // +optional Execution *Execution `json:"execution,omitempty"` // Namespace contains properties for the namespace to use for tests. // +optional Namespace *Namespace `json:"namespace,omitempty"` // Report contains properties for the report. // +optional Report *Report `json:"report,omitempty"` // Templating contains the templating config. // +optional Templating *Templating `json:"templating,omitempty"` // 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 Discovery ¶
type Discovery 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"` }
Discovery options contain the discovery configuration used when discovering tests in folders.
func (*Discovery) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Discovery.
func (*Discovery) DeepCopyInto ¶
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 Execution ¶
type Execution 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"` }
Execution options determine how tests are run.
func (*Execution) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution.
func (*Execution) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Namespace ¶
type Namespace 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"` }
Namespace options contain the configuration used to allocate a namespace for each test.
func (*Namespace) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace.
func (*Namespace) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Report ¶
type Report 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"` }
Report options contain the configuration used for reporting.
func (*Report) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Report.
func (*Report) DeepCopyInto ¶
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 Templating ¶
type Templating struct { // Enabled determines whether resources should be considered for templating. // +optional Enabled *bool `json:"enabled,omitempty"` }
Templating options contain the templating configuration.
func (*Templating) DeepCopy ¶
func (in *Templating) DeepCopy() *Templating
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Templating.
func (*Templating) DeepCopyInto ¶
func (in *Templating) DeepCopyInto(out *Templating)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.