Add support for multiple watched namespaces #585
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for a new environment variable,
WATCH_NAMESPACES
, which allows users to specify a comma-separated list of multiple Kubernetes namespaces that the k6 Operator will watch for its CRDs. The existingWATCH_NAMESPACE
environment variable only supports a single namespace.I added a new e2e test modeled after the existing testrun-watch-namespace scenario to test the new environment variable.
I verified that the new (and existing) tests pass locally on my k3d cluster.
I also manually inspected the virtual cluster while the new test was running and confirmed that the
TestRun
CRD from theinvisible
namespace was not scheduled, but the other two were:(⎈|testrun-watch-namespaces:N/A) $ kubectl get testrun -A NAMESPACE NAME STAGE AGE TESTRUNID invisible k6-sample 84s some-ns k6-sample finished 84s some-other-ns k6-sample finished 84s
Fixes #267