Skip to content

Namespace options

Namespace options contain the configuration used by Chainsaw to allocate a namespace for each test.

Supported elements

Element Default Description
name Name defines the namespace to use for tests. If not specified, every test will execute in a random ephemeral namespace unless the namespace is overridden in a the test spec.
template Template defines a template to create the test namespace.

Configuration

With file

apiVersion: chainsaw.kyverno.io/v1alpha2
kind: Configuration
metadata:
  name: example
spec:
  namespace:
    name: foo
    template:
      metadata:
        annotations:
          from-config-file: hello

With flags

Note

The template element can't be configured with flags.

chainsaw test --namespace foo