Skip to content

Add optional conditions #45

Description

@jacobtomlinson

It would be useful to make some conditions as optional and add a flag to enable them if desired.

For example in the databricks example folks may want Python OR R but not both. They may also want to check for CUDA toolkit for use on GPU nodes, but not everyone will want to test for that.

It would be nice to add an optional setting which still runs them but doesn't fail the test if they fail, but have a CLI flag that makes them mandatory.

E.g

# foo.yaml
apiVersion: container-canary.nvidia.com/v1
kind: Validator
name: foo
command:
  - /bin/sh
  - -c
  - "sleep 3600"
checks:
  - name: bash
    description: Has bash installed
    optional: true
    probe:
      exec:
        command:
          - /bin/sh
          - -c
          - "which bash"
$ canary validate --file foo.yaml --check-optional "bash" somecontainer

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions