Closed thestevenbell closed 1 year ago
You can just create the K6 resource in the SRE namespace and the pods will get started there.
The request is the be able to create the K6 resource in any namespace and have the runner pods start in that namespace.
Hi @thestevenbell, it seems to me like there's an error in this yaml: the namespace should be only in metadata, not in spec. So you should try smth like this:
apiVersion: k6.io/v1alpha1
kind: K6
metadata:
name: k6
namespace: sre # <--- namespace where pods will be created
spec:
parallelism: 1
script:
configMap:
file: test.js
arguments: --tag testid=k6-output-grafana-9 --out experimental-prometheus-rw
runner:
resources:
limits:
cpu: 200m
memory: 1000Mi
requests:
cpu: 100m
memory: 500Mi
env:
- name: K6_PROMETHEUS_RW_SERVER_URL
value: http://sre-kube-prometheus-stack-prometheus.prometheus.svc.cluster.local:9090/api/v1/write
- name: K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM
value: "false"
- name: K6_PROMETHEUS_RW_STALE_MARKERS
value: "true"
- name: K6_PROMETHEUS_RW_PUSH_INTERVAL
value: 2s
Indeed. Creating the K6 resource in a namespace will result in runner pods executing the same namespace. Closing this request.
Requesting the ability to execute test runner pods in specified namespace.