You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, to pass environment variable as part of arguments string in k6-operator, one has to use external tooling, scripts, etc.
Kubernetes supports passing environment variables as argument for pods with specific format. Its equivalent in k6 CRD would be something like this:
Attempt to use the above snippet results in k6 error due to escaped double quotes in --tag option:
time="2022-10-31T14:16:36Z" level=error msg="invalid argument \"pod=\\\"bar\\\"\" for \"--tag\" flag: parse error on line 1, column 5: bare \" in non-quoted-field"
Find solution to pass environment variables in arguments of k6 CRD.
Suggested Solution (optional)
Adding support for passing environment variables in the above format would mean parsing arguments string in full and removing unnecessary escapes for --tag.
Alternatively, establish another approach to pass environment variables to arguments in k6-operator.
Already existing or connected issues / PRs (optional)
Feature Description
At the moment, to pass environment variable as part of
arguments
string in k6-operator, one has to use external tooling, scripts, etc.Kubernetes supports passing environment variables as argument for pods with specific format. Its equivalent in k6 CRD would be something like this:
Attempt to use the above snippet results in k6 error due to escaped double quotes in
--tag
option:Find solution to pass environment variables in
arguments
of k6 CRD.Suggested Solution (optional)
Adding support for passing environment variables in the above format would mean parsing
arguments
string in full and removing unnecessary escapes for--tag
.Alternatively, establish another approach to pass environment variables to
arguments
in k6-operator.Already existing or connected issues / PRs (optional)
This came up in forum question: https://community.k6.io/t/k6-operator-pass-local-environment-variable-as-test-wide-tag/5015
The text was updated successfully, but these errors were encountered: