$NAMESPACE in TestSuite commands is always =default regardless of kuttl test --namespace option
gberche-orange opened this issue · 2 comments
What happened:
$NAMESPACE in TestSuite commands is always set to "default" regardless of the --namespace
option passed to kuttl cli
What you expected to happen:
$NAMESPACE in TestSuite command to be filled with value passed in --namespace
option passed to kuttl cli
How to reproduce it (as minimally and precisely as possible):
suite.yaml
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
metadata:
name: name
commands:
- script: |
echo namespace=$NAMESPACE
$ kubectl kuttl test --namespace kuttl-test-2023-07-05-16h-26m-18s --config [...]/suite.yaml
[...]
namespace=default
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version
): - KUTTL version (use
kubectl kuttl version
): 0.15.0 - Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a
): - Install tools:
- Others:
Why don't you use the TestStep
kind?
thanks @iblancasa
Why don't you use the TestStep kind?
I was trying to preprocess kuttl TestStep yaml files using carvel ytt (https://carvel.dev/ytt/) as a workaround for #203
I tried to do it into a TestSuite within a script but hit this bug + the fact that the TestStep files references in TestSuite seem loaded immediately in memory once the TestSuite loads.
As a workaround, I'm now preprocessing kuttl files prior to executing kuttl. This also solves #379