From cbb876ed6b986016bbc6898da93c0b25e61d4d0f Mon Sep 17 00:00:00 2001 From: Hans Knecht Date: Tue, 19 Oct 2021 07:21:52 -0400 Subject: [PATCH] docs: add note about max config size limit and update prometheus usage (#72) * docs: add note about max config size limit and update prometheus usage Signed-off-by: Hans Knecht * docs: update role for cron job to be minimally expansive --- README.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f52d0fb7..8e6fd09d 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ The operator utilises `ConfigMap`s to serve test scripts to the jobs. To upload $ kubectl create configmap my-test --from-file /path/to/my/test.js ``` +***Note: there is a character limit of 1048576 bytes to a single configmap. If you need to have a larger test file, you'll need to use a volumeClaim instead*** + ### Executing tests Tests are executed by applying the custom resource `K6` to a cluster where the operator is running. The properties of a test run are few, but allow you to control some key aspects of a distributed execution. @@ -103,7 +105,22 @@ test with a really high VU count and want to make sure the resources of each nod #### Serviceaccount -Defines the service account to be used for runners and starter pods. This allows for pulling images from a custom repository. +If you want to use a custom Service Account you'll need to pass it into both the starter and runner object: + +```yaml +apiVersion: k6.io/v1alpha1 +kind: K6 +metadata: + name: +spec: + script: + configMap: + name: "" + runner: + serviceAccountName: + starter: + serviceAccountName: +``` #### Runner @@ -163,11 +180,12 @@ spec: configMap: name: crocodile-stress-test file: test.js - image: k6-prometheus:latest arguments: --out prometheus ports: - containerPort: 5656 name: metrics + runner: + image: k6-prometheus:latest ``` Note that we are replacing the test job image (`k6-prometheus:latest`), passing required arguments to `k6` @@ -216,7 +234,7 @@ This is required to allow the cron job to actually delete and create the k6 obje ```yaml --- apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole +kind: Role metadata: name: k6- rules: @@ -233,12 +251,12 @@ rules: - update - watch --- -kind: ClusterRoleBinding +kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: k6- roleRef: - kind: ClusterRole + kind: Role name: k6- apiGroup: rbac.authorization.k8s.io subjects: