Skip to content

[Feature] Expose timeouts as bindings #2371

@jneuff

Description

@jneuff

Problem Statement

Hi,

it would be helpful to expose the timeouts as bindings. Let's say I do a helm install as part of my test:

apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: should-install
spec:
  timeouts:
    exec: 1m
  steps:
    - try:
      - command:
          entrypoint: helm
          env:
            - name: NAMESPACE
              value: ($namespace)
          args:
            - install
            - my-test
            - ../helm/test-chart
            - --namespace
            - $NAMESPACE
            - --wait
            - --timeout
            - 1m

I have to set the correct timeout twice which is error prone.

Solution Description

Exposing the timeouts as bindings would help simplify the example from above:

spec:
  timeouts:
    exec: 1m
  steps:
    - try:
      - command:
          entrypoint: helm
          env:
            - name: NAMESPACE
              value: ($namespace)
           - name: TIMEOUT
             value: ($timeout-exec)
          args:
            - install
            - my-test
            - ../helm/test-chart
            - --namespace
            - $NAMESPACE
            - --wait
            - --timeout
            - $TIMEOUT

Alternatives

No response

Additional Context

No response

Slack discussion

No response

Research

  • I have searched other issues in this repository and mine is not recorded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions