kuttl
kuttl copied to clipboard
Document Enhance Shell Expansion with Defaults
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
Would like to have a default value if ENV VAR not set as in:
${parameter:-word}
This should already work for *.sh shell scripts... but it would be great if the command expansion included it.
example:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl kudo install kafka --namespace kafka-mwt -P ${KAFKA_PARAMETER_FILE:-params-kind}.yaml
ignoredFailure: true
looks like this will require rewriting env.go core from golang core... features are not exposed to control this behavior :(
I really like the idea of enhanced shell expansions with defaults.. but this should work fine with - script: or shell commands... since there is a reasonable solution. This change this to documentation of how to.