Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure LOG_FORMAT #219

Open
AlainDeleglise opened this issue Dec 31, 2024 · 2 comments
Open

Configure LOG_FORMAT #219

AlainDeleglise opened this issue Dec 31, 2024 · 2 comments

Comments

@AlainDeleglise
Copy link

Hi,

I'm using the latest chart version and the latest image.
I'm trying to output logs in JSON format using the env var, as described here https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#logformat

I'm using this code in the helm chart values :

    webhook:
      name: "k6-loadtester"
      vars:
        "KUBERNETES_CLIENT": "in-cluster"
        "K6_LOG_FORMAT": "json"

But the logs are still in RAW format.

Am I missing something?

@zerok
Copy link
Contributor

zerok commented Jan 3, 2025

Hi 🙂 Sorry for the delay, I'll try to look into this next week.

@zerok
Copy link
Contributor

zerok commented Jan 7, 2025

Ah, you will also need to add that to the k6-loadtester secret 🙂 The vars property (based on looking at the chart) is only there to tell the deployment what variables should be taken from the secret.

So, basically, if you want to inject another environment variable into the webhook and the processes launched by it, you will need to declare the variable in the webhook.vars property and inside the secret for that webhook.

This feels at the very least like a bug in our documentation/comments around this 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants