From 73f7a02cefc4892f29a5ee500138d1eee3a87dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Mon, 3 Jun 2024 09:12:00 +0200 Subject: [PATCH 1/2] docs: fix broken links in v1alpha2 docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- website/apis/config.yaml | 76 +- .../docs/reference/apis/chainsaw.v1alpha2.md | 840 ++++++++++++++++++ 2 files changed, 879 insertions(+), 37 deletions(-) diff --git a/website/apis/config.yaml b/website/apis/config.yaml index e6281cd59..7d01243a9 100644 --- a/website/apis/config.yaml +++ b/website/apis/config.yaml @@ -1,46 +1,48 @@ hiddenMemberFields: - - "TypeMeta" +- TypeMeta externalPackages: - - match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.Duration$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration - - match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.GroupVersionKind$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionKind - - match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.GroupVersionResource$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionResource - - match: ^k8s\.io/apimachinery/pkg/types\.UID$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/types#UID - - match: ^k8s\.io/apimachinery/pkg/runtime\.RawExtension$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime/#RawExtension - - match: ^k8s\.io/apimachinery/pkg/api/resource\.QuantityValue$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue - - match: ^k8s\.io/apimachinery/pkg/api/resource\.Quantity$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity - - match: ^k8s\.io/apimachinery/pkg/runtime\.Unknown$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#Unknown - - match: ^time\.Duration$ - target: https://pkg.go.dev/time#Duration - - match: ^io.Writer$ - target: https://pkg.go.dev/io#Writer - - match: ^k8s\.io/(api|apimachinery/pkg/apis)/ - target: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#{{- lower .TypeIdentifier -}}-{{- arrIndex .PackageSegments -1 -}}-{{- arrIndex .PackageSegments -2 -}} +- match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.Duration$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration +- match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.GroupVersionKind$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionKind +- match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.GroupVersionResource$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionResource +- match: ^k8s\.io/apimachinery/pkg/types\.UID$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/types#UID +- match: ^k8s\.io/apimachinery/pkg/runtime\.RawExtension$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime/#RawExtension +- match: ^k8s\.io/apimachinery/pkg/api/resource\.QuantityValue$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue +- match: ^k8s\.io/apimachinery/pkg/api/resource\.Quantity$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity +- match: ^k8s\.io/apimachinery/pkg/runtime\.Unknown$ + target: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#Unknown +- match: ^time\.Duration$ + target: https://pkg.go.dev/time#Duration +- match: ^io.Writer$ + target: https://pkg.go.dev/io#Writer +- match: ^k8s\.io/(api|apimachinery/pkg/apis)/ + target: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#{{- lower .TypeIdentifier -}}-{{- arrIndex .PackageSegments -1 -}}-{{- arrIndex .PackageSegments -2 -}} stripPrefix: - - k8s.io/api/ - - k8s.io/apimachinery/pkg/apis/ - - github.com/kyverno/kyverno-json/pkg/apis/ - - github.com/tengqm/kubeconfig/config/kubeadm/v1beta2. - - github.com/tengqm/kubeconfig/config/kubeadm/v1beta3. - - github.com/tengqm/kubeconfig/config/bootstraptoken/v1. +- k8s.io/api/ +- k8s.io/apimachinery/pkg/apis/ +- github.com/kyverno/kyverno-json/pkg/apis/ +- github.com/tengqm/kubeconfig/config/kubeadm/v1beta2. +- github.com/tengqm/kubeconfig/config/kubeadm/v1beta3. +- github.com/tengqm/kubeconfig/config/bootstraptoken/v1. markdownDisabled: false apis: - - name: chainsaw - title: chainsaw (v1alpha1) - package: github.com/kyverno/chainsaw - path: pkg/apis/v1alpha1 - - name: chainsaw - title: chainsaw (v1alpha2) - package: github.com/kyverno/chainsaw - path: pkg/apis/v1alpha2 +- name: chainsaw + title: chainsaw (v1alpha1) + package: github.com/kyverno/chainsaw + path: pkg/apis/v1alpha1 +- name: chainsaw + title: chainsaw (v1alpha2) + package: github.com/kyverno/chainsaw + path: pkg/apis/v1alpha2 + includes: + - github.com/kyverno/chainsaw/pkg/apis/v1alpha1 \ No newline at end of file diff --git a/website/docs/reference/apis/chainsaw.v1alpha2.md b/website/docs/reference/apis/chainsaw.v1alpha2.md index bf84e5090..a41932000 100644 --- a/website/docs/reference/apis/chainsaw.v1alpha2.md +++ b/website/docs/reference/apis/chainsaw.v1alpha2.md @@ -1,6 +1,13 @@ --- title: chainsaw (v1alpha2) content_type: tool-reference +package: chainsaw.kyverno.io/v1alpha1 +auto_generated: true +--- +

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

+--- +title: chainsaw (v1alpha2) +content_type: tool-reference package: chainsaw.kyverno.io/v1alpha2 auto_generated: true --- @@ -10,8 +17,841 @@ auto_generated: true ## Resource Types +- [Configuration](#chainsaw-kyverno-io-v1alpha1-Configuration) +- [Test](#chainsaw-kyverno-io-v1alpha1-Test) - [Configuration](#chainsaw-kyverno-io-v1alpha2-Configuration) +## Configuration {#chainsaw-kyverno-io-v1alpha1-Configuration} + +

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

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `apiVersion` | `string` | :white_check_mark: | | `chainsaw.kyverno.io/v1alpha1` | +| `kind` | `string` | :white_check_mark: | | `Configuration` | +| `metadata` | [`meta/v1.ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta) | | |

Standard object's metadata.

| +| `spec` | [`ConfigurationSpec`](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) | :white_check_mark: | |

Configuration spec.

| + +## Test {#chainsaw-kyverno-io-v1alpha1-Test} + +

Test is the resource that contains a test definition.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `apiVersion` | `string` | :white_check_mark: | | `chainsaw.kyverno.io/v1alpha1` | +| `kind` | `string` | :white_check_mark: | | `Test` | +| `metadata` | [`meta/v1.ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta) | | |

Standard object's metadata.

| +| `spec` | [`TestSpec`](#chainsaw-kyverno-io-v1alpha1-TestSpec) | :white_check_mark: | |

Test spec.

| + +## Apply {#chainsaw-kyverno-io-v1alpha1-Apply} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Apply represents a set of configurations or resources that +should be applied during testing.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the resources to be applied.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| +| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| + +## Assert {#chainsaw-kyverno-io-v1alpha1-Assert} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Assert represents a test condition that is expected to hold true +during the testing process.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `FileRefOrCheck` | [`FileRefOrCheck`](#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck) | :white_check_mark: | :white_check_mark: |

FileRefOrAssert provides a reference to the assertion.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| + +## Binding {#chainsaw-kyverno-io-v1alpha1-Binding} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Error](#chainsaw-kyverno-io-v1alpha1-Error) +- [Output](#chainsaw-kyverno-io-v1alpha1-Output) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) +- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

Binding represents a key/value set as a binding in an executing test.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `name` | `string` | :white_check_mark: | |

Name the name of the binding.

| +| `value` | `policy/v1alpha1.Any` | :white_check_mark: | |

Value value of the binding.

| + +## Catch {#chainsaw-kyverno-io-v1alpha1-Catch} + +**Appears in:** + +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) +- [ErrorOptions](#chainsaw-kyverno-io-v1alpha2-ErrorOptions) +- [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) +- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) + +

Catch defines actions to be executed on failure.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `description` | `string` | | |

Description contains a description of the operation.

| +| `podLogs` | [`PodLogs`](#chainsaw-kyverno-io-v1alpha1-PodLogs) | | |

PodLogs determines the pod logs collector to execute.

| +| `events` | [`Events`](#chainsaw-kyverno-io-v1alpha1-Events) | | |

Events determines the events collector to execute.

| +| `describe` | [`Describe`](#chainsaw-kyverno-io-v1alpha1-Describe) | | |

Describe determines the resource describe collector to execute.

| +| `wait` | [`Wait`](#chainsaw-kyverno-io-v1alpha1-Wait) | | |

Wait determines the resource wait collector to execute.

| +| `get` | [`Get`](#chainsaw-kyverno-io-v1alpha1-Get) | | |

Get determines the resource get collector to execute.

| +| `delete` | [`Delete`](#chainsaw-kyverno-io-v1alpha1-Delete) | | |

Delete represents a deletion operation.

| +| `command` | [`Command`](#chainsaw-kyverno-io-v1alpha1-Command) | | |

Command defines a command to run.

| +| `script` | [`Script`](#chainsaw-kyverno-io-v1alpha1-Script) | | |

Script defines a script to run.

| +| `sleep` | [`Sleep`](#chainsaw-kyverno-io-v1alpha1-Sleep) | | |

Sleep defines zzzz.

| + +## Clusters {#chainsaw-kyverno-io-v1alpha1-Clusters} + +(Alias of `map[string]github.com/kyverno/chainsaw/pkg/apis/v1alpha1.Cluster`) + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha2-ConfigurationSpec) +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) +- [Error](#chainsaw-kyverno-io-v1alpha1-Error) +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) +- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

Clusters defines a cluster map.

+ + +## Command {#chainsaw-kyverno-io-v1alpha1-Command} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Command describes a command to run as a part of a test step.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| +| `env` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Env defines additional environment variables.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `entrypoint` | `string` | :white_check_mark: | |

Entrypoint is the command entry point to run.

| +| `args` | `[]string` | | |

Args is the command arguments.

| +| `skipLogOutput` | `bool` | | |

SkipLogOutput removes the output from the command. Useful for sensitive logs or to reduce noise.

| +| `check` | `policy/v1alpha1.Any` | | |

Check is an assertion tree to validate the operation outcome.

| + +## Condition {#chainsaw-kyverno-io-v1alpha1-Condition} + +**Appears in:** + +- [For](#chainsaw-kyverno-io-v1alpha1-For) + +

Condition represents parameters for waiting on a specific condition of a resource.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `name` | `string` | :white_check_mark: | |

Name defines the specific condition to wait for, e.g., "Available", "Ready".

| +| `value` | `string` | | |

Value defines the specific condition status to wait for, e.g., "True", "False".

| + +## ConfigurationSpec {#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec} + +**Appears in:** + +- [Configuration](#chainsaw-kyverno-io-v1alpha1-Configuration) + +

ConfigurationSpec contains the configuration used to run tests.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeouts` | [`Timeouts`](#chainsaw-kyverno-io-v1alpha1-Timeouts) | | |

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

| +| `skipDelete` | `bool` | | |

If set, do not delete the resources after running the tests (implies SkipClusterDelete).

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `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.

| +| `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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

| +| `reportFormat` | [`ReportFormatType`](#chainsaw-kyverno-io-v1alpha1-ReportFormatType) | | |

ReportFormat determines test report format (JSON|XML|nil) nil == no report. maps to report.Type, however we don't want generated.deepcopy to have reference to it.

| +| `reportPath` | `string` | | |

ReportPath defines the path.

| +| `reportName` | `string` | | |

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

| +| `namespace` | `string` | | |

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.

| +| `namespaceTemplate` | `policy/v1alpha1.Any` | | |

NamespaceTemplate defines a template to create the test namespace.

| +| `fullName` | `bool` | | |

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

| +| `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.

| +| `repeatCount` | `int` | | |

RepeatCount indicates how many times the tests should be executed.

| +| `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.

| +| `forceTerminationGracePeriod` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| +| `delayBeforeCleanup` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `catch` | [`[]Catch`](#chainsaw-kyverno-io-v1alpha1-Catch) | | |

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.

| + +## Create {#chainsaw-kyverno-io-v1alpha1-Create} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Create represents a set of resources that should be created. +If a resource already exists in the cluster it will fail.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the file containing the resources to be created.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| +| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| + +## Delete {#chainsaw-kyverno-io-v1alpha1-Delete} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Delete is a reference to an object that should be deleted

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `file` | `string` | | |

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.

| +| `ref` | [`ObjectReference`](#chainsaw-kyverno-io-v1alpha1-ObjectReference) | | |

Ref determines objects to be deleted.

| +| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| +| `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| + +## Deletion {#chainsaw-kyverno-io-v1alpha1-Deletion} + +**Appears in:** + +- [For](#chainsaw-kyverno-io-v1alpha1-For) + +

Deletion represents parameters for waiting on a resource's deletion.

+ + +## Describe {#chainsaw-kyverno-io-v1alpha1-Describe} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) + +

Describe defines how to describe resources.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ResourceReference` | [`ResourceReference`](#chainsaw-kyverno-io-v1alpha1-ResourceReference) | :white_check_mark: | :white_check_mark: |

ResourceReference referenced resource type.

| +| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| +| `showEvents` | `bool` | | |

Show Events indicates whether to include related events.

| + +## Error {#chainsaw-kyverno-io-v1alpha1-Error} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

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.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `FileRefOrCheck` | [`FileRefOrCheck`](#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck) | :white_check_mark: | :white_check_mark: |

FileRefOrAssert provides a reference to the expected error.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| + +## Events {#chainsaw-kyverno-io-v1alpha1-Events} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) + +

Events defines how to collect events.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| +| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| + +## Expectation {#chainsaw-kyverno-io-v1alpha1-Expectation} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

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.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `match` | `policy/v1alpha1.Any` | | |

Match defines the matching statement.

| +| `check` | `policy/v1alpha1.Any` | :white_check_mark: | |

Check defines the verification statement.

| + +## FileRef {#chainsaw-kyverno-io-v1alpha1-FileRef} + +**Appears in:** + +- [FileRefOrCheck](#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck) +- [FileRefOrResource](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) + +

FileRef represents a file reference.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `file` | `string` | :white_check_mark: | |

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.

| + +## FileRefOrCheck {#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck} + +**Appears in:** + +- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) +- [Error](#chainsaw-kyverno-io-v1alpha1-Error) + +

FileRefOrCheck represents a file reference or resource.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `FileRef` | [`FileRef`](#chainsaw-kyverno-io-v1alpha1-FileRef) | | :white_check_mark: |

FileRef provides a reference to the file containing the resources to be applied.

| +| `resource` | `policy/v1alpha1.Any` | | |

Check provides a check used in assertions.

| + +## FileRefOrResource {#chainsaw-kyverno-io-v1alpha1-FileRefOrResource} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

FileRefOrResource represents a file reference or resource.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `FileRef` | [`FileRef`](#chainsaw-kyverno-io-v1alpha1-FileRef) | | :white_check_mark: |

FileRef provides a reference to the file containing the resources to be applied.

| +| `resource` | [`meta/v1/unstructured.Unstructured`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#unstructured-unstructured-v1) | | |

Resource provides a resource to be applied.

| + +## Finally {#chainsaw-kyverno-io-v1alpha1-Finally} + +**Appears in:** + +- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) + +

Finally defines actions to be executed at the end of a test.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `description` | `string` | | |

Description contains a description of the operation.

| +| `podLogs` | [`PodLogs`](#chainsaw-kyverno-io-v1alpha1-PodLogs) | | |

PodLogs determines the pod logs collector to execute.

| +| `events` | [`Events`](#chainsaw-kyverno-io-v1alpha1-Events) | | |

Events determines the events collector to execute.

| +| `describe` | [`Describe`](#chainsaw-kyverno-io-v1alpha1-Describe) | | |

Describe determines the resource describe collector to execute.

| +| `wait` | [`Wait`](#chainsaw-kyverno-io-v1alpha1-Wait) | | |

Wait determines the resource wait collector to execute.

| +| `get` | [`Get`](#chainsaw-kyverno-io-v1alpha1-Get) | | |

Get determines the resource get collector to execute.

| +| `delete` | [`Delete`](#chainsaw-kyverno-io-v1alpha1-Delete) | | |

Delete represents a deletion operation.

| +| `command` | [`Command`](#chainsaw-kyverno-io-v1alpha1-Command) | | |

Command defines a command to run.

| +| `script` | [`Script`](#chainsaw-kyverno-io-v1alpha1-Script) | | |

Script defines a script to run.

| +| `sleep` | [`Sleep`](#chainsaw-kyverno-io-v1alpha1-Sleep) | | |

Sleep defines zzzz.

| + +## For {#chainsaw-kyverno-io-v1alpha1-For} + +**Appears in:** + +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

For specifies the condition to wait for.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `deletion` | [`Deletion`](#chainsaw-kyverno-io-v1alpha1-Deletion) | | |

Deletion specifies parameters for waiting on a resource's deletion.

| +| `condition` | [`Condition`](#chainsaw-kyverno-io-v1alpha1-Condition) | | |

Condition specifies the condition to wait for.

| +| `jsonPath` | [`JsonPath`](#chainsaw-kyverno-io-v1alpha1-JsonPath) | | |

JsonPath specifies the json path condition to wait for.

| + +## Format {#chainsaw-kyverno-io-v1alpha1-Format} + +(Alias of `string`) + +**Appears in:** + +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

Format determines the output format (json or yaml).

+ + +## Get {#chainsaw-kyverno-io-v1alpha1-Get} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) + +

Get defines how to get resources.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ResourceReference` | [`ResourceReference`](#chainsaw-kyverno-io-v1alpha1-ResourceReference) | :white_check_mark: | :white_check_mark: |

ResourceReference referenced resource type.

| +| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| +| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| + +## JsonPath {#chainsaw-kyverno-io-v1alpha1-JsonPath} + +**Appears in:** + +- [For](#chainsaw-kyverno-io-v1alpha1-For) + +

JsonPath represents parameters for waiting on a json path of a resource.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `path` | `string` | :white_check_mark: | |

Path defines the json path to wait for, e.g. '{.status.phase}'.

| +| `value` | `string` | :white_check_mark: | |

Value defines the expected value to wait for, e.g., "Running".

| + +## ObjectLabelsSelector {#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector} + +**Appears in:** + +- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

ObjectLabelsSelector represents a strategy to select objects. +For a single object name and namespace are used to identify the object. +For multiple objects use selector.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `namespace` | `string` | | |

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

| +| `name` | `string` | | |

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

| +| `selector` | `string` | | |

Selector defines labels selector.

| + +## ObjectReference {#chainsaw-kyverno-io-v1alpha1-ObjectReference} + +**Appears in:** + +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) + +

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.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ObjectType` | [`ObjectType`](#chainsaw-kyverno-io-v1alpha1-ObjectType) | :white_check_mark: | :white_check_mark: |

ObjectType determines the type of referenced objects.

| +| `ObjectSelector` | [`ObjectSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectSelector) | :white_check_mark: | :white_check_mark: |

ObjectSelector determines the selection process of referenced objects.

| + +## ObjectSelector {#chainsaw-kyverno-io-v1alpha1-ObjectSelector} + +**Appears in:** + +- [ObjectReference](#chainsaw-kyverno-io-v1alpha1-ObjectReference) + +

ObjectSelector represents a strategy to select objects. +For a single object name and namespace are used to identify the object. +For multiple objects use labels.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `namespace` | `string` | | |

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

| +| `name` | `string` | | |

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

| +| `labels` | `map[string]string` | | |

Label selector to match objects to delete

| + +## ObjectType {#chainsaw-kyverno-io-v1alpha1-ObjectType} + +**Appears in:** + +- [ObjectReference](#chainsaw-kyverno-io-v1alpha1-ObjectReference) + +

ObjectType represents a specific apiVersion and kind.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `apiVersion` | `string` | :white_check_mark: | |

API version of the referent.

| +| `kind` | `string` | :white_check_mark: | |

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

| + +## Operation {#chainsaw-kyverno-io-v1alpha1-Operation} + +**Appears in:** + +- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) + +

Operation defines a single operation, only one action is permitted for a given operation.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `OperationBase` | [`OperationBase`](#chainsaw-kyverno-io-v1alpha1-OperationBase) | | :white_check_mark: |

OperationBase defines common elements to all operations.

| +| `apply` | [`Apply`](#chainsaw-kyverno-io-v1alpha1-Apply) | | |

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.

| +| `assert` | [`Assert`](#chainsaw-kyverno-io-v1alpha1-Assert) | | |

Assert represents an assertion to be made. It checks whether the conditions specified in the assertion hold true.

| +| `command` | [`Command`](#chainsaw-kyverno-io-v1alpha1-Command) | | |

Command defines a command to run.

| +| `create` | [`Create`](#chainsaw-kyverno-io-v1alpha1-Create) | | |

Create represents a creation operation.

| +| `delete` | [`Delete`](#chainsaw-kyverno-io-v1alpha1-Delete) | | |

Delete represents a deletion operation.

| +| `error` | [`Error`](#chainsaw-kyverno-io-v1alpha1-Error) | | |

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.

| +| `patch` | [`Patch`](#chainsaw-kyverno-io-v1alpha1-Patch) | | |

Patch represents a patch operation.

| +| `script` | [`Script`](#chainsaw-kyverno-io-v1alpha1-Script) | | |

Script defines a script to run.

| +| `sleep` | [`Sleep`](#chainsaw-kyverno-io-v1alpha1-Sleep) | | |

Sleep defines zzzz.

| +| `update` | [`Update`](#chainsaw-kyverno-io-v1alpha1-Update) | | |

Update represents an update operation.

| +| `wait` | [`Wait`](#chainsaw-kyverno-io-v1alpha1-Wait) | | |

Wait determines the resource wait collector to execute.

| + +## OperationBase {#chainsaw-kyverno-io-v1alpha1-OperationBase} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

OperationBase defines common elements to all operations.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `description` | `string` | | |

Description contains a description of the operation.

| +| `continueOnError` | `bool` | | |

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.

| + +## Output {#chainsaw-kyverno-io-v1alpha1-Output} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

Output represents an output binding with a match to determine if the binding must be considered or not.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `Binding` | [`Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | :white_check_mark: | :white_check_mark: |

Binding determines the binding to create when the match succeeds.

| +| `match` | `policy/v1alpha1.Any` | | |

Match defines the matching statement.

| + +## Patch {#chainsaw-kyverno-io-v1alpha1-Patch} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Patch represents a set of resources that should be patched. +If a resource doesn't exist yet in the cluster it will fail.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the file containing the resources to be patched.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| +| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| + +## PodLogs {#chainsaw-kyverno-io-v1alpha1-PodLogs} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) + +

PodLogs defines how to collect pod logs.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| +| `container` | `string` | | |

Container in pod to get logs from else --all-containers is used.

| +| `tail` | `int` | | |

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`.

| + +## ReportFormatType {#chainsaw-kyverno-io-v1alpha1-ReportFormatType} + +(Alias of `string`) + +**Appears in:** + +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) + +## ResourceReference {#chainsaw-kyverno-io-v1alpha1-ResourceReference} + +**Appears in:** + +- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

ResourceReference represents a resource (API).

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `apiVersion` | `string` | :white_check_mark: | |

API version of the referent.

| +| `kind` | `string` | :white_check_mark: | |

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

| + +## Script {#chainsaw-kyverno-io-v1alpha1-Script} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Script describes a script to run as a part of a test step.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| +| `env` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Env defines additional environment variables.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `content` | `string` | | |

Content defines a shell script (run with "sh -c ...").

| +| `skipLogOutput` | `bool` | | |

SkipLogOutput removes the output from the command. Useful for sensitive logs or to reduce noise.

| +| `check` | `policy/v1alpha1.Any` | | |

Check is an assertion tree to validate the operation outcome.

| + +## Sleep {#chainsaw-kyverno-io-v1alpha1-Sleep} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Sleep represents a duration while nothing happens.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `duration` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Duration is the delay used for sleeping.

| + +## TestSpec {#chainsaw-kyverno-io-v1alpha1-TestSpec} + +**Appears in:** + +- [Test](#chainsaw-kyverno-io-v1alpha1-Test) + +

TestSpec contains the test spec.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `description` | `string` | | |

Description contains a description of the test.

| +| `timeouts` | [`Timeouts`](#chainsaw-kyverno-io-v1alpha1-Timeouts) | | |

Timeouts for the test. Overrides the global timeouts set in the Configuration on a per operation basis.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `skip` | `bool` | | |

Skip determines whether the test should skipped.

| +| `concurrent` | `bool` | | |

Concurrent determines whether the test should run concurrently with other tests.

| +| `skipDelete` | `bool` | | |

SkipDelete determines whether the resources created by the test should be deleted after the test is executed.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `namespace` | `string` | | |

Namespace determines whether the test should run in a random ephemeral namespace or not.

| +| `namespaceTemplate` | `policy/v1alpha1.Any` | | |

NamespaceTemplate defines a template to create the test namespace.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `steps` | [`[]TestStep`](#chainsaw-kyverno-io-v1alpha1-TestStep) | :white_check_mark: | |

Steps defining the test.

| +| `catch` | [`[]Catch`](#chainsaw-kyverno-io-v1alpha1-Catch) | | |

Catch defines what the steps will execute when an error happens. This will be combined with catch handlers defined at the step level.

| +| `forceTerminationGracePeriod` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| +| `delayBeforeCleanup` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| +| `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| + +## TestStep {#chainsaw-kyverno-io-v1alpha1-TestStep} + +**Appears in:** + +- [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) + +

TestStep contains the test step definition used in a test spec.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `name` | `string` | | |

Name of the step.

| +| `TestStepSpec` | [`TestStepSpec`](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) | :white_check_mark: | :white_check_mark: |

TestStepSpec of the step.

| + +## TestStepSpec {#chainsaw-kyverno-io-v1alpha1-TestStepSpec} + +**Appears in:** + +- [TestStep](#chainsaw-kyverno-io-v1alpha1-TestStep) + +

TestStepSpec defines the desired state and behavior for each test step.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `description` | `string` | | |

Description contains a description of the test step.

| +| `timeouts` | [`Timeouts`](#chainsaw-kyverno-io-v1alpha1-Timeouts) | | |

Timeouts for the test step. Overrides the global timeouts set in the Configuration and the timeouts eventually set in the Test.

| +| `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `skipDelete` | `bool` | | |

SkipDelete determines whether the resources created by the step should be deleted after the test step is executed.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `try` | [`[]Operation`](#chainsaw-kyverno-io-v1alpha1-Operation) | :white_check_mark: | |

Try defines what the step will try to execute.

| +| `catch` | [`[]Catch`](#chainsaw-kyverno-io-v1alpha1-Catch) | | |

Catch defines what the step will execute when an error happens.

| +| `finally` | [`[]Finally`](#chainsaw-kyverno-io-v1alpha1-Finally) | | |

Finally defines what the step will execute after the step is terminated.

| +| `cleanup` | [`[]Finally`](#chainsaw-kyverno-io-v1alpha1-Finally) | | |

Cleanup defines what will be executed after the test is terminated.

| + +## Timeouts {#chainsaw-kyverno-io-v1alpha1-Timeouts} + +**Appears in:** + +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha2-ConfigurationSpec) +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) +- [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) +- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) + +

Timeouts contains timeouts per operation.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `apply` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Apply defines the timeout for the apply operation

| +| `assert` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Assert defines the timeout for the assert operation

| +| `cleanup` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Cleanup defines the timeout for the cleanup operation

| +| `delete` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Delete defines the timeout for the delete operation

| +| `error` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Error defines the timeout for the error operation

| +| `exec` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Exec defines the timeout for exec operations

| + +## Update {#chainsaw-kyverno-io-v1alpha1-Update} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Update represents a set of resources that should be updated. +If a resource does not exist in the cluster it will fail.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| +| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the file containing the resources to be created.

| +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| +| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| + +## Wait {#chainsaw-kyverno-io-v1alpha1-Wait} + +**Appears in:** + +- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) +- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Wait specifies how to perform wait operations on resources.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Specifies how long to wait for the condition to be met before timing out.

| +| `cluster` | `string` | | |

Cluster defines the target cluster where the wait operation will be performed (default cluster will be used if not specified).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ResourceReference` | [`ResourceReference`](#chainsaw-kyverno-io-v1alpha1-ResourceReference) | :white_check_mark: | :white_check_mark: |

ResourceReference referenced resource type.

| +| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| +| `for` | [`For`](#chainsaw-kyverno-io-v1alpha1-For) | :white_check_mark: | |

For specifies the condition to wait for.

| +| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| + + + ## Configuration {#chainsaw-kyverno-io-v1alpha2-Configuration}

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

From cf2a39a86f360d751d76fd2dfa52baff14c613c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Mon, 16 Sep 2024 15:19:55 +0200 Subject: [PATCH 2/2] update docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- .../docs/reference/apis/chainsaw.v1alpha2.md | 847 +++++++++++------- 1 file changed, 538 insertions(+), 309 deletions(-) diff --git a/website/docs/reference/apis/chainsaw.v1alpha2.md b/website/docs/reference/apis/chainsaw.v1alpha2.md index 0d715bb15..4a0f96a9a 100644 --- a/website/docs/reference/apis/chainsaw.v1alpha2.md +++ b/website/docs/reference/apis/chainsaw.v1alpha2.md @@ -18,6 +18,7 @@ auto_generated: true - [Configuration](#chainsaw-kyverno-io-v1alpha1-Configuration) +- [StepTemplate](#chainsaw-kyverno-io-v1alpha1-StepTemplate) - [Test](#chainsaw-kyverno-io-v1alpha1-Test) - [Configuration](#chainsaw-kyverno-io-v1alpha2-Configuration) @@ -33,6 +34,18 @@ auto_generated: true | `metadata` | [`meta/v1.ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta) | | |

Standard object's metadata.

| | `spec` | [`ConfigurationSpec`](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) | :white_check_mark: | |

Configuration spec.

| +## StepTemplate {#chainsaw-kyverno-io-v1alpha1-StepTemplate} + +

StepTemplate is the resource that contains a step definition.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `apiVersion` | `string` | :white_check_mark: | | `chainsaw.kyverno.io/v1alpha1` | +| `kind` | `string` | :white_check_mark: | | `StepTemplate` | +| `metadata` | [`meta/v1.ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta) | | |

Standard object's metadata.

| +| `spec` | [`StepTemplateSpec`](#chainsaw-kyverno-io-v1alpha1-StepTemplateSpec) | :white_check_mark: | |

Test step spec.

| + ## Test {#chainsaw-kyverno-io-v1alpha1-Test}

Test is the resource that contains a test definition.

@@ -45,48 +58,218 @@ auto_generated: true | `metadata` | [`meta/v1.ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta) | | |

Standard object's metadata.

| | `spec` | [`TestSpec`](#chainsaw-kyverno-io-v1alpha1-TestSpec) | :white_check_mark: | |

Test spec.

| -## Apply {#chainsaw-kyverno-io-v1alpha1-Apply} +## ActionBindings {#chainsaw-kyverno-io-v1alpha1-ActionBindings} **Appears in:** -- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Error](#chainsaw-kyverno-io-v1alpha1-Error) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) -

Apply represents a set of configurations or resources that -should be applied during testing.

+

ActionBindings contains bindings options for an action.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| | `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the resources to be applied.

| + +## ActionCheck {#chainsaw-kyverno-io-v1alpha1-ActionCheck} + +**Appears in:** + +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) + +

ActionCheck contains check for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `check` | `policy/v1alpha1.Any` | | |

Check is an assertion tree to validate the operation outcome.

| + +## ActionCheckRef {#chainsaw-kyverno-io-v1alpha1-ActionCheckRef} + +**Appears in:** + +- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) +- [Error](#chainsaw-kyverno-io-v1alpha1-Error) + +

ActionCheckRef contains check reference options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `FileRef` | [`FileRef`](#chainsaw-kyverno-io-v1alpha1-FileRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `resource` | `policy/v1alpha1.Any` | | |

Check provides a check used in assertions.

| | `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| + +## ActionClusters {#chainsaw-kyverno-io-v1alpha1-ActionClusters} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) +- [Error](#chainsaw-kyverno-io-v1alpha1-Error) +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) +- [Proxy](#chainsaw-kyverno-io-v1alpha1-Proxy) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

ActionClusters contains clusters options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `cluster` | `string` | | |

Cluster defines the target cluster (will be inherited if not specified).

| +| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| + +## ActionDryRun {#chainsaw-kyverno-io-v1alpha1-ActionDryRun} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

ActionDryRun contains dry run options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| | `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| + +## ActionEnv {#chainsaw-kyverno-io-v1alpha1-ActionEnv} + +**Appears in:** + +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) + +

ActionEnv contains environment options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `env` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Env defines additional environment variables.

| +| `skipLogOutput` | `bool` | | |

SkipLogOutput removes the output from the command. Useful for sensitive logs or to reduce noise.

| + +## ActionExpectations {#chainsaw-kyverno-io-v1alpha1-ActionExpectations} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

ActionExpectations contains expectations for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| | `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| -## Assert {#chainsaw-kyverno-io-v1alpha1-Assert} +## ActionFormat {#chainsaw-kyverno-io-v1alpha1-ActionFormat} **Appears in:** -- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) -

Assert represents a test condition that is expected to hold true -during the testing process.

+

ActionFormat contains format for an action.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `FileRefOrCheck` | [`FileRefOrCheck`](#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck) | :white_check_mark: | :white_check_mark: |

FileRefOrAssert provides a reference to the assertion.

| +| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| + +## ActionObject {#chainsaw-kyverno-io-v1alpha1-ActionObject} + +**Appears in:** + +- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

ActionObject contains object selector options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ObjectType` | [`ObjectType`](#chainsaw-kyverno-io-v1alpha1-ObjectType) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionObjectSelector` | [`ActionObjectSelector`](#chainsaw-kyverno-io-v1alpha1-ActionObjectSelector) | :white_check_mark: | :white_check_mark: | *No description provided.* | + +## ActionObjectSelector {#chainsaw-kyverno-io-v1alpha1-ActionObjectSelector} + +**Appears in:** + +- [ActionObject](#chainsaw-kyverno-io-v1alpha1-ActionObject) +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) + +

ActionObjectSelector contains object selector options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ObjectName` | [`ObjectName`](#chainsaw-kyverno-io-v1alpha1-ObjectName) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `selector` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

Selector defines labels selector.

| + +## ActionOutputs {#chainsaw-kyverno-io-v1alpha1-ActionOutputs} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Command](#chainsaw-kyverno-io-v1alpha1-Command) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Proxy](#chainsaw-kyverno-io-v1alpha1-Proxy) +- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

ActionOutputs contains outputs options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| + +## ActionResourceRef {#chainsaw-kyverno-io-v1alpha1-ActionResourceRef} + +**Appears in:** + +- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) +- [Create](#chainsaw-kyverno-io-v1alpha1-Create) +- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) + +

ActionResourceRef contains resource reference options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `FileRef` | [`FileRef`](#chainsaw-kyverno-io-v1alpha1-FileRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `resource` | [`meta/v1/unstructured.Unstructured`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#unstructured-unstructured-v1) | | |

Resource provides a resource to be applied.

| | `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| -## Binding {#chainsaw-kyverno-io-v1alpha1-Binding} +## ActionTimeout {#chainsaw-kyverno-io-v1alpha1-ActionTimeout} **Appears in:** @@ -95,32 +278,93 @@ during the testing process.

- [Command](#chainsaw-kyverno-io-v1alpha1-Command) - [Create](#chainsaw-kyverno-io-v1alpha1-Create) - [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) - [Error](#chainsaw-kyverno-io-v1alpha1-Error) -- [Output](#chainsaw-kyverno-io-v1alpha1-Output) +- [Events](#chainsaw-kyverno-io-v1alpha1-Events) +- [Get](#chainsaw-kyverno-io-v1alpha1-Get) - [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) +- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) +- [Proxy](#chainsaw-kyverno-io-v1alpha1-Proxy) - [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [Update](#chainsaw-kyverno-io-v1alpha1-Update) +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

ActionTimeout contains timeout options for an action.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| + +## Apply {#chainsaw-kyverno-io-v1alpha1-Apply} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Apply represents a set of configurations or resources that +should be applied during testing.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionDryRun` | [`ActionDryRun`](#chainsaw-kyverno-io-v1alpha1-ActionDryRun) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionExpectations` | [`ActionExpectations`](#chainsaw-kyverno-io-v1alpha1-ActionExpectations) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionResourceRef` | [`ActionResourceRef`](#chainsaw-kyverno-io-v1alpha1-ActionResourceRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | + +## Assert {#chainsaw-kyverno-io-v1alpha1-Assert} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Assert represents a test condition that is expected to hold true +during the testing process.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionCheckRef` | [`ActionCheckRef`](#chainsaw-kyverno-io-v1alpha1-ActionCheckRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | + +## Binding {#chainsaw-kyverno-io-v1alpha1-Binding} + +**Appears in:** + +- [ActionBindings](#chainsaw-kyverno-io-v1alpha1-ActionBindings) +- [ActionEnv](#chainsaw-kyverno-io-v1alpha1-ActionEnv) +- [Output](#chainsaw-kyverno-io-v1alpha1-Output) +- [Scenario](#chainsaw-kyverno-io-v1alpha1-Scenario) +- [StepTemplateSpec](#chainsaw-kyverno-io-v1alpha1-StepTemplateSpec) - [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) - [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) -- [Update](#chainsaw-kyverno-io-v1alpha1-Update) +- [With](#chainsaw-kyverno-io-v1alpha1-With)

Binding represents a key/value set as a binding in an executing test.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `name` | `string` | :white_check_mark: | |

Name the name of the binding.

| +| `name` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | :white_check_mark: | |

Name the name of the binding.

| | `value` | `policy/v1alpha1.Any` | :white_check_mark: | |

Value value of the binding.

| -## Catch {#chainsaw-kyverno-io-v1alpha1-Catch} +## CatchFinally {#chainsaw-kyverno-io-v1alpha1-CatchFinally} **Appears in:** - [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) - [ErrorOptions](#chainsaw-kyverno-io-v1alpha2-ErrorOptions) +- [StepTemplateSpec](#chainsaw-kyverno-io-v1alpha1-StepTemplateSpec) - [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) - [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) -

Catch defines actions to be executed on failure.

+

CatchFinally defines actions to be executed in catch, finally and cleanup blocks.

| Field | Type | Required | Inline | Description | @@ -142,24 +386,11 @@ during the testing process.

**Appears in:** -- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) -- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) -- [Command](#chainsaw-kyverno-io-v1alpha1-Command) -- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha2-ConfigurationSpec) +- [ActionClusters](#chainsaw-kyverno-io-v1alpha1-ActionClusters) - [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) -- [Create](#chainsaw-kyverno-io-v1alpha1-Create) -- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) -- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) -- [Error](#chainsaw-kyverno-io-v1alpha1-Error) -- [Events](#chainsaw-kyverno-io-v1alpha1-Events) -- [Get](#chainsaw-kyverno-io-v1alpha1-Get) -- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) -- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) -- [Script](#chainsaw-kyverno-io-v1alpha1-Script) +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha2-ConfigurationSpec) - [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) - [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) -- [Update](#chainsaw-kyverno-io-v1alpha1-Update) -- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait)

Clusters defines a cluster map.

@@ -168,8 +399,7 @@ during the testing process.

**Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) - [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Command describes a command to run as a part of a test step.

@@ -177,30 +407,15 @@ during the testing process.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| -| `env` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Env defines additional environment variables.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionCheck` | [`ActionCheck`](#chainsaw-kyverno-io-v1alpha1-ActionCheck) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionEnv` | [`ActionEnv`](#chainsaw-kyverno-io-v1alpha1-ActionEnv) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | | `entrypoint` | `string` | :white_check_mark: | |

Entrypoint is the command entry point to run.

| | `args` | `[]string` | | |

Args is the command arguments.

| -| `skipLogOutput` | `bool` | | |

SkipLogOutput removes the output from the command. Useful for sensitive logs or to reduce noise.

| -| `check` | `policy/v1alpha1.Any` | | |

Check is an assertion tree to validate the operation outcome.

| - -## Condition {#chainsaw-kyverno-io-v1alpha1-Condition} - -**Appears in:** - -- [For](#chainsaw-kyverno-io-v1alpha1-For) - -

Condition represents parameters for waiting on a specific condition of a resource.

- - -| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `name` | `string` | :white_check_mark: | |

Name defines the specific condition to wait for, e.g., "Available", "Ready".

| -| `value` | `string` | | |

Value defines the specific condition status to wait for, e.g., "True", "False".

| +| `workDir` | `string` | | |

WorkDir is the working directory for command.

| ## ConfigurationSpec {#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec} @@ -213,13 +428,13 @@ during the testing process.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeouts` | [`Timeouts`](#chainsaw-kyverno-io-v1alpha1-Timeouts) | | |

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

| +| `timeouts` | [`DefaultTimeouts`](#chainsaw-kyverno-io-v1alpha1-DefaultTimeouts) | | |

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

| | `skipDelete` | `bool` | | |

If set, do not delete the resources after running the tests (implies SkipClusterDelete).

| | `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| | `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.

| | `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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

| -| `reportFormat` | [`ReportFormatType`](#chainsaw-kyverno-io-v1alpha1-ReportFormatType) | | |

ReportFormat determines test report format (JSON|XML|nil) nil == no report. maps to report.Type, however we don't want generated.deepcopy to have reference to it.

| +| `reportFormat` | [`ReportFormatType`](#chainsaw-kyverno-io-v1alpha1-ReportFormatType) | | |

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.

| | `reportPath` | `string` | | |

ReportPath defines the path.

| | `reportName` | `string` | | |

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

| | `namespace` | `string` | | |

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.

| @@ -232,7 +447,7 @@ during the testing process.

| `forceTerminationGracePeriod` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| | `delayBeforeCleanup` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| | `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `catch` | [`[]Catch`](#chainsaw-kyverno-io-v1alpha1-Catch) | | |

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.

| +| `catch` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-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.

| ## Create {#chainsaw-kyverno-io-v1alpha1-Create} @@ -246,65 +461,69 @@ If a resource already exists in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the file containing the resources to be created.

| -| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| -| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| -| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionDryRun` | [`ActionDryRun`](#chainsaw-kyverno-io-v1alpha1-ActionDryRun) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionExpectations` | [`ActionExpectations`](#chainsaw-kyverno-io-v1alpha1-ActionExpectations) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionResourceRef` | [`ActionResourceRef`](#chainsaw-kyverno-io-v1alpha1-ActionResourceRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | -## Delete {#chainsaw-kyverno-io-v1alpha1-Delete} +## DefaultTimeouts {#chainsaw-kyverno-io-v1alpha1-DefaultTimeouts} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) -- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) +- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha2-ConfigurationSpec) -

Delete is a reference to an object that should be deleted

+

DefaultTimeouts contains defautl timeouts per operation.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| -| `file` | `string` | | |

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.

| -| `ref` | [`ObjectReference`](#chainsaw-kyverno-io-v1alpha1-ObjectReference) | | |

Ref determines objects to be deleted.

| -| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| -| `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| +| `apply` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Apply defines the timeout for the apply operation

| +| `assert` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Assert defines the timeout for the assert operation

| +| `cleanup` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Cleanup defines the timeout for the cleanup operation

| +| `delete` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Delete defines the timeout for the delete operation

| +| `error` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Error defines the timeout for the error operation

| +| `exec` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Exec defines the timeout for exec operations

| -## Deletion {#chainsaw-kyverno-io-v1alpha1-Deletion} +## Delete {#chainsaw-kyverno-io-v1alpha1-Delete} **Appears in:** -- [For](#chainsaw-kyverno-io-v1alpha1-For) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Delete is a reference to an object that should be deleted

-

Deletion represents parameters for waiting on a resource's deletion.

+| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionExpectations` | [`ActionExpectations`](#chainsaw-kyverno-io-v1alpha1-ActionExpectations) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `file` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

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.

| +| `ref` | [`ObjectReference`](#chainsaw-kyverno-io-v1alpha1-ObjectReference) | | |

Ref determines objects to be deleted.

| +| `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| ## Describe {#chainsaw-kyverno-io-v1alpha1-Describe} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Describe defines how to describe resources.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `ResourceReference` | [`ResourceReference`](#chainsaw-kyverno-io-v1alpha1-ResourceReference) | :white_check_mark: | :white_check_mark: |

ResourceReference referenced resource type.

| -| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionObject` | [`ActionObject`](#chainsaw-kyverno-io-v1alpha1-ActionObject) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | | `showEvents` | `bool` | | |

Show Events indicates whether to include related events.

| ## Error {#chainsaw-kyverno-io-v1alpha1-Error} @@ -319,40 +538,33 @@ Instead of treating such an error as a test failure, it acknowledges it as expec | Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `FileRefOrCheck` | [`FileRefOrCheck`](#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck) | :white_check_mark: | :white_check_mark: |

FileRefOrAssert provides a reference to the expected error.

| -| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionCheckRef` | [`ActionCheckRef`](#chainsaw-kyverno-io-v1alpha1-ActionCheckRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | ## Events {#chainsaw-kyverno-io-v1alpha1-Events} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Events defines how to collect events.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| -| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionFormat` | [`ActionFormat`](#chainsaw-kyverno-io-v1alpha1-ActionFormat) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionObjectSelector` | [`ActionObjectSelector`](#chainsaw-kyverno-io-v1alpha1-ActionObjectSelector) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | ## Expectation {#chainsaw-kyverno-io-v1alpha1-Expectation} **Appears in:** -- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) -- [Create](#chainsaw-kyverno-io-v1alpha1-Create) -- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) -- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) -- [Update](#chainsaw-kyverno-io-v1alpha1-Update) +- [ActionExpectations](#chainsaw-kyverno-io-v1alpha1-ActionExpectations)

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.

@@ -363,88 +575,39 @@ with a match filter to determine if the verification should be considered.

| `match` | `policy/v1alpha1.Any` | | |

Match defines the matching statement.

| | `check` | `policy/v1alpha1.Any` | :white_check_mark: | |

Check defines the verification statement.

| -## FileRef {#chainsaw-kyverno-io-v1alpha1-FileRef} - -**Appears in:** - -- [FileRefOrCheck](#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck) -- [FileRefOrResource](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) - -

FileRef represents a file reference.

- - -| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `file` | `string` | :white_check_mark: | |

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.

| - -## FileRefOrCheck {#chainsaw-kyverno-io-v1alpha1-FileRefOrCheck} - -**Appears in:** - -- [Assert](#chainsaw-kyverno-io-v1alpha1-Assert) -- [Error](#chainsaw-kyverno-io-v1alpha1-Error) - -

FileRefOrCheck represents a file reference or resource.

- - -| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `FileRef` | [`FileRef`](#chainsaw-kyverno-io-v1alpha1-FileRef) | | :white_check_mark: |

FileRef provides a reference to the file containing the resources to be applied.

| -| `resource` | `policy/v1alpha1.Any` | | |

Check provides a check used in assertions.

| - -## FileRefOrResource {#chainsaw-kyverno-io-v1alpha1-FileRefOrResource} - -**Appears in:** - -- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) -- [Create](#chainsaw-kyverno-io-v1alpha1-Create) -- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) -- [Update](#chainsaw-kyverno-io-v1alpha1-Update) - -

FileRefOrResource represents a file reference or resource.

- - -| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `FileRef` | [`FileRef`](#chainsaw-kyverno-io-v1alpha1-FileRef) | | :white_check_mark: |

FileRef provides a reference to the file containing the resources to be applied.

| -| `resource` | [`meta/v1/unstructured.Unstructured`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#unstructured-unstructured-v1) | | |

Resource provides a resource to be applied.

| +## Expression {#chainsaw-kyverno-io-v1alpha1-Expression} -## Finally {#chainsaw-kyverno-io-v1alpha1-Finally} +(Alias of `string`) **Appears in:** -- [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) - -

Finally defines actions to be executed at the end of a test.

+- [ActionObjectSelector](#chainsaw-kyverno-io-v1alpha1-ActionObjectSelector) +- [Binding](#chainsaw-kyverno-io-v1alpha1-Binding) +- [Delete](#chainsaw-kyverno-io-v1alpha1-Delete) +- [FileRef](#chainsaw-kyverno-io-v1alpha1-FileRef) +- [ObjectName](#chainsaw-kyverno-io-v1alpha1-ObjectName) +- [ObjectType](#chainsaw-kyverno-io-v1alpha1-ObjectType) +- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) +- [Proxy](#chainsaw-kyverno-io-v1alpha1-Proxy) +- [WaitForCondition](#chainsaw-kyverno-io-v1alpha1-WaitForCondition) +- [WaitForJsonPath](#chainsaw-kyverno-io-v1alpha1-WaitForJsonPath) +

Expression defines an expression to be used in string fields.

-| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `description` | `string` | | |

Description contains a description of the operation.

| -| `podLogs` | [`PodLogs`](#chainsaw-kyverno-io-v1alpha1-PodLogs) | | |

PodLogs determines the pod logs collector to execute.

| -| `events` | [`Events`](#chainsaw-kyverno-io-v1alpha1-Events) | | |

Events determines the events collector to execute.

| -| `describe` | [`Describe`](#chainsaw-kyverno-io-v1alpha1-Describe) | | |

Describe determines the resource describe collector to execute.

| -| `wait` | [`Wait`](#chainsaw-kyverno-io-v1alpha1-Wait) | | |

Wait determines the resource wait collector to execute.

| -| `get` | [`Get`](#chainsaw-kyverno-io-v1alpha1-Get) | | |

Get determines the resource get collector to execute.

| -| `delete` | [`Delete`](#chainsaw-kyverno-io-v1alpha1-Delete) | | |

Delete represents a deletion operation.

| -| `command` | [`Command`](#chainsaw-kyverno-io-v1alpha1-Command) | | |

Command defines a command to run.

| -| `script` | [`Script`](#chainsaw-kyverno-io-v1alpha1-Script) | | |

Script defines a script to run.

| -| `sleep` | [`Sleep`](#chainsaw-kyverno-io-v1alpha1-Sleep) | | |

Sleep defines zzzz.

| -## For {#chainsaw-kyverno-io-v1alpha1-For} +## FileRef {#chainsaw-kyverno-io-v1alpha1-FileRef} **Appears in:** -- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) +- [ActionCheckRef](#chainsaw-kyverno-io-v1alpha1-ActionCheckRef) +- [ActionResourceRef](#chainsaw-kyverno-io-v1alpha1-ActionResourceRef) -

For specifies the condition to wait for.

+

FileRef represents a file reference.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `deletion` | [`Deletion`](#chainsaw-kyverno-io-v1alpha1-Deletion) | | |

Deletion specifies parameters for waiting on a resource's deletion.

| -| `condition` | [`Condition`](#chainsaw-kyverno-io-v1alpha1-Condition) | | |

Condition specifies the condition to wait for.

| -| `jsonPath` | [`JsonPath`](#chainsaw-kyverno-io-v1alpha1-JsonPath) | | |

JsonPath specifies the json path condition to wait for.

| +| `file` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | :white_check_mark: | |

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.

| ## Format {#chainsaw-kyverno-io-v1alpha1-Format} @@ -452,9 +615,7 @@ with a match filter to determine if the verification should be considered.

**Appears in:** -- [Events](#chainsaw-kyverno-io-v1alpha1-Events) -- [Get](#chainsaw-kyverno-io-v1alpha1-Get) -- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) +- [ActionFormat](#chainsaw-kyverno-io-v1alpha1-ActionFormat)

Format determines the output format (json or yaml).

@@ -463,55 +624,34 @@ with a match filter to determine if the verification should be considered.

**Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Get defines how to get resources.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `ResourceReference` | [`ResourceReference`](#chainsaw-kyverno-io-v1alpha1-ResourceReference) | :white_check_mark: | :white_check_mark: |

ResourceReference referenced resource type.

| -| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| -| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| - -## JsonPath {#chainsaw-kyverno-io-v1alpha1-JsonPath} - -**Appears in:** - -- [For](#chainsaw-kyverno-io-v1alpha1-For) - -

JsonPath represents parameters for waiting on a json path of a resource.

- - -| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `path` | `string` | :white_check_mark: | |

Path defines the json path to wait for, e.g. '{.status.phase}'.

| -| `value` | `string` | :white_check_mark: | |

Value defines the expected value to wait for, e.g., "Running".

| +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionFormat` | [`ActionFormat`](#chainsaw-kyverno-io-v1alpha1-ActionFormat) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionObject` | [`ActionObject`](#chainsaw-kyverno-io-v1alpha1-ActionObject) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | -## ObjectLabelsSelector {#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector} +## ObjectName {#chainsaw-kyverno-io-v1alpha1-ObjectName} **Appears in:** -- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) -- [Events](#chainsaw-kyverno-io-v1alpha1-Events) -- [Get](#chainsaw-kyverno-io-v1alpha1-Get) -- [PodLogs](#chainsaw-kyverno-io-v1alpha1-PodLogs) -- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) +- [ActionObjectSelector](#chainsaw-kyverno-io-v1alpha1-ActionObjectSelector) +- [ObjectReference](#chainsaw-kyverno-io-v1alpha1-ObjectReference) +- [Proxy](#chainsaw-kyverno-io-v1alpha1-Proxy) -

ObjectLabelsSelector represents a strategy to select objects. -For a single object name and namespace are used to identify the object. -For multiple objects use selector.

+

ObjectName represents an object namespace and name.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `namespace` | `string` | | |

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

| -| `name` | `string` | | |

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

| -| `selector` | `string` | | |

Selector defines labels selector.

| +| `namespace` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

| +| `name` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

| ## ObjectReference {#chainsaw-kyverno-io-v1alpha1-ObjectReference} @@ -526,44 +666,31 @@ For multiple objects use labels.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `ObjectType` | [`ObjectType`](#chainsaw-kyverno-io-v1alpha1-ObjectType) | :white_check_mark: | :white_check_mark: |

ObjectType determines the type of referenced objects.

| -| `ObjectSelector` | [`ObjectSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectSelector) | :white_check_mark: | :white_check_mark: |

ObjectSelector determines the selection process of referenced objects.

| - -## ObjectSelector {#chainsaw-kyverno-io-v1alpha1-ObjectSelector} - -**Appears in:** - -- [ObjectReference](#chainsaw-kyverno-io-v1alpha1-ObjectReference) - -

ObjectSelector represents a strategy to select objects. -For a single object name and namespace are used to identify the object. -For multiple objects use labels.

- - -| Field | Type | Required | Inline | Description | -|---|---|---|---|---| -| `namespace` | `string` | | |

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

| -| `name` | `string` | | |

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

| +| `ObjectType` | [`ObjectType`](#chainsaw-kyverno-io-v1alpha1-ObjectType) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ObjectName` | [`ObjectName`](#chainsaw-kyverno-io-v1alpha1-ObjectName) | :white_check_mark: | :white_check_mark: | *No description provided.* | | `labels` | `map[string]string` | | |

Label selector to match objects to delete

| ## ObjectType {#chainsaw-kyverno-io-v1alpha1-ObjectType} **Appears in:** +- [ActionObject](#chainsaw-kyverno-io-v1alpha1-ActionObject) - [ObjectReference](#chainsaw-kyverno-io-v1alpha1-ObjectReference) +- [Proxy](#chainsaw-kyverno-io-v1alpha1-Proxy)

ObjectType represents a specific apiVersion and kind.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `apiVersion` | `string` | :white_check_mark: | |

API version of the referent.

| -| `kind` | `string` | :white_check_mark: | |

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

| +| `apiVersion` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | :white_check_mark: | |

API version of the referent.

| +| `kind` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | :white_check_mark: | |

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

| ## Operation {#chainsaw-kyverno-io-v1alpha1-Operation} **Appears in:** +- [StepTemplateSpec](#chainsaw-kyverno-io-v1alpha1-StepTemplateSpec) - [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec)

Operation defines a single operation, only one action is permitted for a given operation.

@@ -577,8 +704,13 @@ For multiple objects use labels.

| `command` | [`Command`](#chainsaw-kyverno-io-v1alpha1-Command) | | |

Command defines a command to run.

| | `create` | [`Create`](#chainsaw-kyverno-io-v1alpha1-Create) | | |

Create represents a creation operation.

| | `delete` | [`Delete`](#chainsaw-kyverno-io-v1alpha1-Delete) | | |

Delete represents a deletion operation.

| +| `describe` | [`Describe`](#chainsaw-kyverno-io-v1alpha1-Describe) | | |

Describe determines the resource describe collector to execute.

| | `error` | [`Error`](#chainsaw-kyverno-io-v1alpha1-Error) | | |

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.

| +| `events` | [`Events`](#chainsaw-kyverno-io-v1alpha1-Events) | | |

Events determines the events collector to execute.

| +| `get` | [`Get`](#chainsaw-kyverno-io-v1alpha1-Get) | | |

Get determines the resource get collector to execute.

| | `patch` | [`Patch`](#chainsaw-kyverno-io-v1alpha1-Patch) | | |

Patch represents a patch operation.

| +| `podLogs` | [`PodLogs`](#chainsaw-kyverno-io-v1alpha1-PodLogs) | | |

PodLogs determines the pod logs collector to execute.

| +| `proxy` | [`Proxy`](#chainsaw-kyverno-io-v1alpha1-Proxy) | | |

Proxy runs a proxy request.

| | `script` | [`Script`](#chainsaw-kyverno-io-v1alpha1-Script) | | |

Script defines a script to run.

| | `sleep` | [`Sleep`](#chainsaw-kyverno-io-v1alpha1-Sleep) | | |

Sleep defines zzzz.

| | `update` | [`Update`](#chainsaw-kyverno-io-v1alpha1-Update) | | |

Update represents an update operation.

| @@ -602,12 +734,7 @@ For multiple objects use labels.

**Appears in:** -- [Apply](#chainsaw-kyverno-io-v1alpha1-Apply) -- [Command](#chainsaw-kyverno-io-v1alpha1-Command) -- [Create](#chainsaw-kyverno-io-v1alpha1-Create) -- [Patch](#chainsaw-kyverno-io-v1alpha1-Patch) -- [Script](#chainsaw-kyverno-io-v1alpha1-Script) -- [Update](#chainsaw-kyverno-io-v1alpha1-Update) +- [ActionOutputs](#chainsaw-kyverno-io-v1alpha1-ActionOutputs)

Output represents an output binding with a match to determine if the binding must be considered or not.

@@ -629,35 +756,51 @@ If a resource doesn't exist yet in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the file containing the resources to be patched.

| -| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| -| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| -| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionDryRun` | [`ActionDryRun`](#chainsaw-kyverno-io-v1alpha1-ActionDryRun) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionExpectations` | [`ActionExpectations`](#chainsaw-kyverno-io-v1alpha1-ActionExpectations) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionResourceRef` | [`ActionResourceRef`](#chainsaw-kyverno-io-v1alpha1-ActionResourceRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | ## PodLogs {#chainsaw-kyverno-io-v1alpha1-PodLogs} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

PodLogs defines how to collect pod logs.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| -| `container` | `string` | | |

Container in pod to get logs from else --all-containers is used.

| +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionObjectSelector` | [`ActionObjectSelector`](#chainsaw-kyverno-io-v1alpha1-ActionObjectSelector) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `container` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

Container in pod to get logs from else --all-containers is used.

| | `tail` | `int` | | |

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`.

| +## Proxy {#chainsaw-kyverno-io-v1alpha1-Proxy} + +**Appears in:** + +- [Operation](#chainsaw-kyverno-io-v1alpha1-Operation) + +

Proxy defines how to get resources.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ObjectName` | [`ObjectName`](#chainsaw-kyverno-io-v1alpha1-ObjectName) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ObjectType` | [`ObjectType`](#chainsaw-kyverno-io-v1alpha1-ObjectType) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `port` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

TargetPort defines the target port to proxy the request.

| +| `path` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

TargetPath defines the target path to proxy the request.

| + ## ReportFormatType {#chainsaw-kyverno-io-v1alpha1-ReportFormatType} (Alias of `string`) @@ -666,28 +809,24 @@ If a resource doesn't exist yet in the cluster it will fail.

- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) -## ResourceReference {#chainsaw-kyverno-io-v1alpha1-ResourceReference} +## Scenario {#chainsaw-kyverno-io-v1alpha1-Scenario} **Appears in:** -- [Describe](#chainsaw-kyverno-io-v1alpha1-Describe) -- [Get](#chainsaw-kyverno-io-v1alpha1-Get) -- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) +- [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) -

ResourceReference represents a resource (API).

+

Scenario defines per scenario bindings.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `apiVersion` | `string` | :white_check_mark: | |

API version of the referent.

| -| `kind` | `string` | :white_check_mark: | |

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines binding key/values.

| ## Script {#chainsaw-kyverno-io-v1alpha1-Script} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) - [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Script describes a script to run as a part of a test step.

@@ -695,22 +834,20 @@ If a resource doesn't exist yet in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| -| `env` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Env defines additional environment variables.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionCheck` | [`ActionCheck`](#chainsaw-kyverno-io-v1alpha1-ActionCheck) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionEnv` | [`ActionEnv`](#chainsaw-kyverno-io-v1alpha1-ActionEnv) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | | `content` | `string` | | |

Content defines a shell script (run with "sh -c ...").

| -| `skipLogOutput` | `bool` | | |

SkipLogOutput removes the output from the command. Useful for sensitive logs or to reduce noise.

| -| `check` | `policy/v1alpha1.Any` | | |

Check is an assertion tree to validate the operation outcome.

| +| `workDir` | `string` | | |

WorkDir is the working directory for script.

| ## Sleep {#chainsaw-kyverno-io-v1alpha1-Sleep} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) - [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Sleep represents a duration while nothing happens.

@@ -720,6 +857,23 @@ If a resource doesn't exist yet in the cluster it will fail.

|---|---|---|---|---| | `duration` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | :white_check_mark: | |

Duration is the delay used for sleeping.

| +## StepTemplateSpec {#chainsaw-kyverno-io-v1alpha1-StepTemplateSpec} + +**Appears in:** + +- [StepTemplate](#chainsaw-kyverno-io-v1alpha1-StepTemplate) + +

StepTemplateSpec defines the spec of a step template.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| +| `try` | [`[]Operation`](#chainsaw-kyverno-io-v1alpha1-Operation) | :white_check_mark: | |

Try defines what the step will try to execute.

| +| `catch` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Catch defines what the step will execute when an error happens.

| +| `finally` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Finally defines what the step will execute after the step is terminated.

| +| `cleanup` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Cleanup defines what will be executed after the test is terminated.

| + ## TestSpec {#chainsaw-kyverno-io-v1alpha1-TestSpec} **Appears in:** @@ -732,8 +886,9 @@ If a resource doesn't exist yet in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| | `description` | `string` | | |

Description contains a description of the test.

| +| `failFast` | `bool` | | |

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

| | `timeouts` | [`Timeouts`](#chainsaw-kyverno-io-v1alpha1-Timeouts) | | |

Timeouts for the test. Overrides the global timeouts set in the Configuration on a per operation basis.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `cluster` | `string` | | |

Cluster defines the target cluster (will be inherited if not specified).

| | `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| | `skip` | `bool` | | |

Skip determines whether the test should skipped.

| | `concurrent` | `bool` | | |

Concurrent determines whether the test should run concurrently with other tests.

| @@ -741,9 +896,10 @@ If a resource doesn't exist yet in the cluster it will fail.

| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| | `namespace` | `string` | | |

Namespace determines whether the test should run in a random ephemeral namespace or not.

| | `namespaceTemplate` | `policy/v1alpha1.Any` | | |

NamespaceTemplate defines a template to create the test namespace.

| +| `scenarios` | [`[]Scenario`](#chainsaw-kyverno-io-v1alpha1-Scenario) | | |

Scenarios defines test scenarios.

| | `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| | `steps` | [`[]TestStep`](#chainsaw-kyverno-io-v1alpha1-TestStep) | :white_check_mark: | |

Steps defining the test.

| -| `catch` | [`[]Catch`](#chainsaw-kyverno-io-v1alpha1-Catch) | | |

Catch defines what the steps will execute when an error happens. This will be combined with catch handlers defined at the step level.

| +| `catch` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Catch defines what the steps will execute when an error happens. This will be combined with catch handlers defined at the step level.

| | `forceTerminationGracePeriod` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| | `delayBeforeCleanup` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

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

| | `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| @@ -760,6 +916,7 @@ If a resource doesn't exist yet in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| | `name` | `string` | | |

Name of the step.

| +| `use` | [`Use`](#chainsaw-kyverno-io-v1alpha1-Use) | :white_check_mark: | |

Use defines a reference to a step template.

| | `TestStepSpec` | [`TestStepSpec`](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) | :white_check_mark: | :white_check_mark: |

TestStepSpec of the step.

| ## TestStepSpec {#chainsaw-kyverno-io-v1alpha1-TestStepSpec} @@ -776,22 +933,20 @@ If a resource doesn't exist yet in the cluster it will fail.

| `description` | `string` | | |

Description contains a description of the test step.

| | `timeouts` | [`Timeouts`](#chainsaw-kyverno-io-v1alpha1-Timeouts) | | |

Timeouts for the test step. Overrides the global timeouts set in the Configuration and the timeouts eventually set in the Test.

| | `deletionPropagationPolicy` | [`meta/v1.DeletionPropagation`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deletionpropagation-v1-meta) | | |

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.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| +| `cluster` | `string` | | |

Cluster defines the target cluster (will be inherited if not specified).

| | `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| | `skipDelete` | `bool` | | |

SkipDelete determines whether the resources created by the step should be deleted after the test step is executed.

| | `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| | `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `try` | [`[]Operation`](#chainsaw-kyverno-io-v1alpha1-Operation) | :white_check_mark: | |

Try defines what the step will try to execute.

| -| `catch` | [`[]Catch`](#chainsaw-kyverno-io-v1alpha1-Catch) | | |

Catch defines what the step will execute when an error happens.

| -| `finally` | [`[]Finally`](#chainsaw-kyverno-io-v1alpha1-Finally) | | |

Finally defines what the step will execute after the step is terminated.

| -| `cleanup` | [`[]Finally`](#chainsaw-kyverno-io-v1alpha1-Finally) | | |

Cleanup defines what will be executed after the test is terminated.

| +| `try` | [`[]Operation`](#chainsaw-kyverno-io-v1alpha1-Operation) | | |

Try defines what the step will try to execute.

| +| `catch` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Catch defines what the step will execute when an error happens.

| +| `finally` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Finally defines what the step will execute after the step is terminated.

| +| `cleanup` | [`[]CatchFinally`](#chainsaw-kyverno-io-v1alpha1-CatchFinally) | | |

Cleanup defines what will be executed after the test is terminated.

| ## Timeouts {#chainsaw-kyverno-io-v1alpha1-Timeouts} **Appears in:** -- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha2-ConfigurationSpec) -- [ConfigurationSpec](#chainsaw-kyverno-io-v1alpha1-ConfigurationSpec) - [TestSpec](#chainsaw-kyverno-io-v1alpha1-TestSpec) - [TestStepSpec](#chainsaw-kyverno-io-v1alpha1-TestStepSpec) @@ -819,22 +974,33 @@ If a resource does not exist in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Overrides the global timeout set in the Configuration.

| -| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

| -| `outputs` | [`[]Output`](#chainsaw-kyverno-io-v1alpha1-Output) | | |

Outputs defines output bindings.

| -| `cluster` | `string` | | |

Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `FileRefOrResource` | [`FileRefOrResource`](#chainsaw-kyverno-io-v1alpha1-FileRefOrResource) | :white_check_mark: | :white_check_mark: |

FileRefOrResource provides a reference to the file containing the resources to be created.

| -| `template` | `bool` | | |

Template determines whether resources should be considered for templating.

| -| `dryRun` | `bool` | | |

DryRun determines whether the file should be applied in dry run mode.

| -| `expect` | [`[]Expectation`](#chainsaw-kyverno-io-v1alpha1-Expectation) | | |

Expect defines a list of matched checks to validate the operation outcome.

| +| `ActionBindings` | [`ActionBindings`](#chainsaw-kyverno-io-v1alpha1-ActionBindings) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionDryRun` | [`ActionDryRun`](#chainsaw-kyverno-io-v1alpha1-ActionDryRun) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionExpectations` | [`ActionExpectations`](#chainsaw-kyverno-io-v1alpha1-ActionExpectations) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionOutputs` | [`ActionOutputs`](#chainsaw-kyverno-io-v1alpha1-ActionOutputs) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionResourceRef` | [`ActionResourceRef`](#chainsaw-kyverno-io-v1alpha1-ActionResourceRef) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | + +## Use {#chainsaw-kyverno-io-v1alpha1-Use} + +**Appears in:** + +- [TestStep](#chainsaw-kyverno-io-v1alpha1-TestStep) + +

Use defines a reference to a step template.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `template` | `string` | :white_check_mark: | |

Template references a step template.

| +| `with` | [`With`](#chainsaw-kyverno-io-v1alpha1-With) | | |

With defines arguments passed to the step template.

| ## Wait {#chainsaw-kyverno-io-v1alpha1-Wait} **Appears in:** -- [Catch](#chainsaw-kyverno-io-v1alpha1-Catch) -- [Finally](#chainsaw-kyverno-io-v1alpha1-Finally) +- [CatchFinally](#chainsaw-kyverno-io-v1alpha1-CatchFinally) - [Operation](#chainsaw-kyverno-io-v1alpha1-Operation)

Wait specifies how to perform wait operations on resources.

@@ -842,13 +1008,76 @@ If a resource does not exist in the cluster it will fail.

| Field | Type | Required | Inline | Description | |---|---|---|---|---| -| `timeout` | [`meta/v1.Duration`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) | | |

Timeout for the operation. Specifies how long to wait for the condition to be met before timing out.

| -| `cluster` | `string` | | |

Cluster defines the target cluster where the wait operation will be performed (default cluster will be used if not specified).

| -| `clusters` | [`Clusters`](#chainsaw-kyverno-io-v1alpha1-Clusters) | | |

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

| -| `ResourceReference` | [`ResourceReference`](#chainsaw-kyverno-io-v1alpha1-ResourceReference) | :white_check_mark: | :white_check_mark: |

ResourceReference referenced resource type.

| -| `ObjectLabelsSelector` | [`ObjectLabelsSelector`](#chainsaw-kyverno-io-v1alpha1-ObjectLabelsSelector) | | :white_check_mark: |

ObjectLabelsSelector determines the selection process of referenced objects.

| -| `for` | [`For`](#chainsaw-kyverno-io-v1alpha1-For) | :white_check_mark: | |

For specifies the condition to wait for.

| -| `format` | [`Format`](#chainsaw-kyverno-io-v1alpha1-Format) | | |

Format determines the output format (json or yaml).

| +| `ActionTimeout` | [`ActionTimeout`](#chainsaw-kyverno-io-v1alpha1-ActionTimeout) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionFormat` | [`ActionFormat`](#chainsaw-kyverno-io-v1alpha1-ActionFormat) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionClusters` | [`ActionClusters`](#chainsaw-kyverno-io-v1alpha1-ActionClusters) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `ActionObject` | [`ActionObject`](#chainsaw-kyverno-io-v1alpha1-ActionObject) | :white_check_mark: | :white_check_mark: | *No description provided.* | +| `for` | [`WaitFor`](#chainsaw-kyverno-io-v1alpha1-WaitFor) | :white_check_mark: | |

WaitFor specifies the condition to wait for.

| + +## WaitFor {#chainsaw-kyverno-io-v1alpha1-WaitFor} + +**Appears in:** + +- [Wait](#chainsaw-kyverno-io-v1alpha1-Wait) + +

WaitFor specifies the condition to wait for.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `deletion` | [`WaitForDeletion`](#chainsaw-kyverno-io-v1alpha1-WaitForDeletion) | | |

Deletion specifies parameters for waiting on a resource's deletion.

| +| `condition` | [`WaitForCondition`](#chainsaw-kyverno-io-v1alpha1-WaitForCondition) | | |

Condition specifies the condition to wait for.

| +| `jsonPath` | [`WaitForJsonPath`](#chainsaw-kyverno-io-v1alpha1-WaitForJsonPath) | | |

JsonPath specifies the json path condition to wait for.

| + +## WaitForCondition {#chainsaw-kyverno-io-v1alpha1-WaitForCondition} + +**Appears in:** + +- [WaitFor](#chainsaw-kyverno-io-v1alpha1-WaitFor) + +

WaitForCondition represents parameters for waiting on a specific condition of a resource.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `name` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | :white_check_mark: | |

Name defines the specific condition to wait for, e.g., "Available", "Ready".

| +| `value` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

Value defines the specific condition status to wait for, e.g., "True", "False".

| + +## WaitForDeletion {#chainsaw-kyverno-io-v1alpha1-WaitForDeletion} + +**Appears in:** + +- [WaitFor](#chainsaw-kyverno-io-v1alpha1-WaitFor) + +

WaitForDeletion represents parameters for waiting on a resource's deletion.

+ + +## WaitForJsonPath {#chainsaw-kyverno-io-v1alpha1-WaitForJsonPath} + +**Appears in:** + +- [WaitFor](#chainsaw-kyverno-io-v1alpha1-WaitFor) + +

WaitForJsonPath represents parameters for waiting on a json path of a resource.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `path` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | :white_check_mark: | |

Path defines the json path to wait for, e.g. '{.status.phase}'.

| +| `value` | [`Expression`](#chainsaw-kyverno-io-v1alpha1-Expression) | | |

Value defines the expected value to wait for, e.g., "Running".

| + +## With {#chainsaw-kyverno-io-v1alpha1-With} + +**Appears in:** + +- [Use](#chainsaw-kyverno-io-v1alpha1-Use) + +

With defines arguments passed to step templates.

+ + +| Field | Type | Required | Inline | Description | +|---|---|---|---|---| +| `bindings` | [`[]Binding`](#chainsaw-kyverno-io-v1alpha1-Binding) | | |

Bindings defines additional binding key/values.

|