Closed arpitrege123 closed 1 month ago
Tried it with kind: TestRun
as well , same error
Hi @arpitrege123, it appears your setup requires k6 pods to have a tags.datadoghq.com/env
label. You can set it with .spec.runner.metadata.labels
field.
You haven't shared your policy, but I assume starter pod will also need those labels: those are set with .spec.starter.metadata.labels
field.
Yes this works after adding the properties in k6 crd definition . thanks
Brief summary
error from k6-operator-controller-manager even though the tags are added . ERROR Reconciler error {"controller": "k6", "controllerGroup": "k6.io", "controllerKind": "K6", "K6": {"name":"k6-sample","namespace":"default"}, "namespace": "default", "name": "k6-sample", "reconcileID": "", "error": "admission webhook \"validate.kyverno.svc-ignore\" denied the request: \n\nresource Job/default/k6-sample-initializer was blocked due to the following policies \n\nrequire-dd-label:\n check-for-env-label: 'validation error: The label
tags.datadoghq.com/env
is required.\n rule check-for-env-label failed at path /spec/template/metadata/labels/tags.datadoghq.com/env/'\n"}k6-operator version or image
k6-operator:latest
Helm chart version (if applicable)
No response
TestRun / PrivateLoadZone YAML
apiVersion: k6.io/v1alpha1 kind: K6 metadata: name: k6-sample labels: tags.datadoghq.com/env: perf-test tags.datadoghq.com/service: k6-operator annotations: linkerd.io/inject: enabled spec: parallelism: 1 script: configMap: name: k6-test file: k6_script_notifySessionFlow.js template: metadata: labels: tags.datadoghq.com/env: perf-test tags.datadoghq.com/service: k6-operator
Other environment details (if applicable)
No response
Steps to reproduce the problem
Getting error while deploying the above Yaml for k6 crd kubectl apply -f k6run.yaml
Expected behaviour
Should spin up new pod
Actual behaviour
getting error in k6-operator-system logs