Skip to content

Events

Display one or many events.

Configuration

The full structure of the Events resource is documented here.

Features

Supported features
Bindings support ❌
Outputs support ❌
Templating support ❌
Operation checks support ❌

Test namespace

When used with a namespaced resource, Chainsaw will default the scope to the ephemeral test namespace.

All namespaces

When used with a namespaced resource, it is possible to consider all namespaces in the cluster by setting namespace: '*'.

Examples

apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: example
spec:
  steps:
  - try: ...
    catch:
    # get all events in the test namespace
    - events: {}
---
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: example
spec:
  steps:
  - try: ...
    catch:
    # get events in a specific namespace
    - events:
        namespace: foo
---
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: example
spec:
  steps:
  - try: ...
    catch:
    # get event by name
    - events:
        name: my-event

Label selector

apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: example
spec:
  steps:
  - try: ...
    catch:
    - events:
        # get events using a label selector query
        selector: app=my-app
---
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: example
spec:
  steps:
  - try: ...
    catch:
    - events:
        # get events using a label selector query
        selector: app=my-app
        namespace: foo

Format

apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: example
spec:
  steps:
  - try: ...
    catch:
    - events:
        format: json