-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Feature Request
Allow env vars to be specified for the test pod in config.yaml (because sometimes passing args is not convenient)
Example:
I've created a source-to-image (S2I) builder that takes a repository of tests as an input (written to use a version of the openshift commandline test suite) and produces a test image that is compatible with scorecard. The rest runner and the test function library are fixed, but the test repository itself is open-ended.
It would be nice to be able to set environment variables for the test pod in the scorecard config.yaml to control optional features or configure particular tests. The executable invoked by operator-sdk scorecard itself cannot really take these test-specific values as arguments, since the runner is general
The following seems to be a workaround, but it's a little messy and may interfere with a signal handler in PID 1 (still have to test that)
tests:
- name: "customtest1"
image: quay.io/tmckayus/perceptilabs-test:latest
entrypoint:
- bash
- -c
- "export STORAGE_CLASS=sam; scorecard -- -i"
labels:
suite: peakDescribe the solution you'd like
I would like to see something like this
tests:
- name: "customtest1"
image: quay.io/tmckayus/perceptilabs-test:latest
entrypoint:
- scorecard
env:
STORAGE_CLASS: sam
labels:
suite: peak