Skip to content

Commit

Permalink
Correct k6 image name and prometheus environment variable
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Balogh <[email protected]>
  • Loading branch information
javaducky authored and yorugac committed Jan 19, 2023
1 parent ce639bc commit d614836
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ spec:
In other words, `file` option must be the correct entrypoint for `k6 run`.

### Using extensions
By default, the operator will use `loadimpact/k6:latest` as the container image for the test jobs. If you want to use
By default, the operator will use `grafana/k6:latest` as the container image for the test jobs. If you want to use
extensions built with [xk6](https://github.com/grafana/xk6) you'll need to create your own image and override the `image`
property on the `K6` kubernetes resource. For example, the following Dockerfile can be used to create a container
image using `https://github.com/grafana/xk6-output-prometheus-remote` as an extension:
Expand All @@ -307,7 +307,7 @@ RUN go install go.k6.io/xk6/cmd/xk6@latest
RUN xk6 build --output /k6 --with github.com/grafana/xk6-output-prometheus-remote@latest
# Use the operator's base image and override the k6 binary
FROM loadimpact/k6:latest
FROM grafana/k6:latest
COPY --from=builder /k6 /usr/bin/k6
```

Expand All @@ -330,12 +330,12 @@ spec:
runner:
image: k6-prometheus:local
env:
- name: K6_PROMETHEUS_REMOTE_URL
- name: K6_PROMETHEUS_RW_SERVER_URL
value: http://prometheus.somewhere:9090/api/v1/write
```

Note that we are replacing the test job image (`k6-prometheus:latest`), passing required arguments to `k6`
(`-o xk6-prometheus-rw`), and also setting the environment variable to the runner (`K6_PROMETHEUS_REMOTE_URL`).
(`-o xk6-prometheus-rw`), and also setting the environment variable to the runner (`K6_PROMETHEUS_RW_SERVER_URL`).

<!-- If using the Prometheus Operator, you'll also need to create a pod monitor:

Expand Down

0 comments on commit d614836

Please sign in to comment.