Skip to content

Commit 88c4e57

Browse files
Add new WATCH_NAMESPACES env var to k6 operator docs (#1973)
* Add new WATCH_NAMESPACES env var to k6 operator docs * Update next docs too * Update docs + example to mention both env vars * Revise copy * Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent <[email protected]> --------- Co-authored-by: Heitor Tashiro Sergent <[email protected]>
1 parent 27edc07 commit 88c4e57

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

docs/sources/k6/next/set-up/set-up-distributed-k6/install-k6-operator.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,15 @@ The k6 Operator includes custom resources called `TestRun`, `PrivateLoadZone`, a
7171
make install
7272
```
7373

74-
## Watch namespace
74+
## Watch namespaces
7575

76-
By default, the k6 Operator watches the `TestRun` and `PrivateLoadZone` custom resources in all namespaces. You can also configure the k6 Operator to watch a specific namespace by setting the `WATCH_NAMESPACE` environment variable for the operator's deployment:
76+
By default, the k6 Operator watches the `TestRun` and `PrivateLoadZone` custom resources in all namespaces.
77+
You can also configure the k6 Operator to watch specific namespaces by setting either of the following environment variables on the controller's deployment:
78+
79+
* `WATCH_NAMESPACE`: expects the name of a single namespace.
80+
* `WATCH_NAMESPACES`: expects a comma-separated list of namespaces.
81+
82+
Don't set both variables. If `WATCH_NAMESPACES` is set, `WATCH_NAMESPACE` will be ignored.
7783

7884
```yaml
7985
apiVersion: apps/v1
@@ -86,10 +92,13 @@ spec:
8692
spec:
8793
containers:
8894
- name: manager
89-
image: ghcr.io/grafana/k6-operator:controller-v0.0.14
95+
image: ghcr.io/grafana/k6-operator:controller-v0.0.22
9096
env:
9197
- name: WATCH_NAMESPACE
92-
value: 'some-ns'
98+
value: "some-ns"
99+
# Only use one option, WATCH_NAMESPACE or WATCH_NAMESPACES
100+
# - name: WATCH_NAMESPACES
101+
# value: "some-ns,some-other-namespace"
93102
# ...
94103
```
95104

docs/sources/k6/v1.1.x/set-up/set-up-distributed-k6/install-k6-operator.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,15 @@ The k6 Operator includes custom resources called `TestRun`, `PrivateLoadZone`, a
7171
make install
7272
```
7373

74-
## Watch namespace
74+
## Watch namespaces
7575

76-
By default, the k6 Operator watches the `TestRun` and `PrivateLoadZone` custom resources in all namespaces. You can also configure the k6 Operator to watch a specific namespace by setting the `WATCH_NAMESPACE` environment variable for the operator's deployment:
76+
By default, the k6 Operator watches the `TestRun` and `PrivateLoadZone` custom resources in all namespaces.
77+
You can also configure the k6 Operator to watch specific namespaces by setting either of the following environment variables on the controller's deployment:
78+
79+
* `WATCH_NAMESPACE`: expects the name of a single namespace.
80+
* `WATCH_NAMESPACES`: expects a comma-separated list of namespaces.
81+
82+
Don't set both variables. If `WATCH_NAMESPACES` is set, `WATCH_NAMESPACE` will be ignored.
7783

7884
```yaml
7985
apiVersion: apps/v1
@@ -86,10 +92,13 @@ spec:
8692
spec:
8793
containers:
8894
- name: manager
89-
image: ghcr.io/grafana/k6-operator:controller-v0.0.14
95+
image: ghcr.io/grafana/k6-operator:controller-v0.0.22
9096
env:
9197
- name: WATCH_NAMESPACE
92-
value: 'some-ns'
98+
value: "some-ns"
99+
# Only use one option, WATCH_NAMESPACE or WATCH_NAMESPACES
100+
# - name: WATCH_NAMESPACES
101+
# value: "some-ns,some-other-namespace"
93102
# ...
94103
```
95104

0 commit comments

Comments
 (0)