Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$NAMESPACE in TestSuite commands is always =default regardless of kuttl test --namespace option #475

Open
gberche-orange opened this issue Jul 5, 2023 · 2 comments

Comments

@gberche-orange
Copy link
Contributor

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:
@iblancasa
Copy link
Collaborator

Why don't you use the TestStep kind?

@gberche-orange
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants