Skip to content

Helm: Add support for custom args #605

@Brice187

Description

@Brice187

Problem:

I am using the sql_exporter helmchart in a gitops environment.

Developing custom crafted metrics is currently toilsome because getting a fresh developed collector into my dev environment, i have to commit/push the change to the feature-branch, sync the gitops repo, wait for redeployment of the sql_exporter pod and than i have to set a new port-forward to my localhost to curl the metrics endpoint.

Solution:

My proposed solution would be:

kubectl exec -it deployment/sql-exporter -- sh

vi /tmp/mymetric.dev.yaml

the sql_exporter.yml would glob the collectors /tmp/*.dev.yam and after every change I would get feedback when I quickly reload the config.

long story short

There are three possible solutions

  1. template container command args

The args of the container are hardcoded:

args: ["-config.file=/etc/sql_exporter/sql_exporter.yml"]

It would be nice if I could add -web.enable-reload via helm.

Bonus:

reload:
  enabled: true # (default false)

^ Would do the job to ;)

  1. Create ENV var to enable reload

  2. Default to web.enable-reload

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions