Skip to content

v1alpha2

Package v1alpha2 contains API Schema definitions for the v1alpha2 API group.

Resource Types

Configuration

Configuration is the resource that contains the configuration used to run tests.

Field Type Required Inline Description
apiVersion string ✅ chainsaw.kyverno.io/v1alpha2
kind string ✅ Configuration
metadata meta/v1.ObjectMeta

Standard object's metadata.

spec ConfigurationSpec ✅

Configuration spec.

CleanupOptions

Appears in:

CleanupOptions contains the configuration used for cleaning up resources.

Field Type Required Inline Description
skipDelete bool

If set, do not delete the resources after running a test.

delayBeforeCleanup meta/v1.Duration

DelayBeforeCleanup adds a delay between the time a test ends and the time cleanup starts.

ConfigurationSpec

Appears in:

ConfigurationSpec contains the configuration used to run tests.

Field Type Required Inline Description
cleanup CleanupOptions

Cleanup contains cleanup configuration.

clusters Clusters

Clusters holds a registry to clusters to support multi-cluster tests.

deletion DeletionOptions

Deletion contains the global deletion configuration.

discovery DiscoveryOptions

Discovery contains tests discovery configuration.

error ErrorOptions

Error contains the global error configuration.

execution ExecutionOptions

Execution contains tests execution configuration.

namespace NamespaceOptions

Namespace contains properties for the namespace to use for tests.

report ReportOptions

Report contains properties for the report.

templating TemplatingOptions

Templating contains the templating config.

timeouts DefaultTimeouts

Global timeouts configuration. Applies to all tests/test steps if not overridden.

DeletionOptions

Appears in:

DeletionOptions contains the configuration used for deleting resources.

Field Type Required Inline Description
propagation meta/v1.DeletionPropagation

Propagation decides if a deletion will propagate to the dependents of the object, and how the garbage collector will handle the propagation.

DiscoveryOptions

Appears in:

DiscoveryOptions contains the discovery configuration used when discovering tests in folders.

Field Type Required Inline Description
excludeTestRegex string

ExcludeTestRegex is used to exclude tests based on a regular expression.

includeTestRegex string

IncludeTestRegex is used to include tests based on a regular expression.

testFile string

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.

fullName bool

FullName makes use of the full test case folder path instead of the folder name.

ErrorOptions

Appears in:

ErrorOptions contains the global error configuration.

Field Type Required Inline Description
catch []CatchFinally

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.

ExecutionOptions

Appears in:

ExecutionOptions determines how tests are run.

Field Type Required Inline Description
failFast bool

FailFast determines whether the test should stop upon encountering the first failure.

parallel int

The maximum number of tests to run at once.

repeatCount int

RepeatCount indicates how many times the tests should be executed.

forceTerminationGracePeriod meta/v1.Duration

ForceTerminationGracePeriod forces the termination grace period on pods, statefulsets, daemonsets and deployments.

NamespaceOptions

Appears in:

NamespaceOptions contains the configuration used to allocate a namespace for each test.

Field Type Required Inline Description
name string

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.

compiler policy/v1alpha1.Compiler

Compiler defines the default compiler to use when evaluating expressions.

template Projection

Template defines a template to create the test namespace.

ReportFormatType

(Alias of string)

Appears in:

ReportOptions

Appears in:

ReportOptions contains the configuration used for reporting.

Field Type Required Inline Description
format ReportFormatType

ReportFormat determines test report format (JSON

path string

ReportPath defines the path.

name string

ReportName defines the name of report to create. It defaults to "chainsaw-report".

TemplatingOptions

Appears in:

TemplatingOptions contains the templating configuration.

Field Type Required Inline Description
enabled bool

Enabled determines whether resources should be considered for templating.

compiler policy/v1alpha1.Compiler

Compiler defines the default compiler to use when evaluating expressions.