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

v2: how to use dynamic variable in extraconfig #1199

Open
khjean opened this issue Feb 4, 2025 · 0 comments
Open

v2: how to use dynamic variable in extraconfig #1199

khjean opened this issue Feb 4, 2025 · 0 comments

Comments

@khjean
Copy link

khjean commented Feb 4, 2025

k8s-monitoring chart version : 2.0.4

I m using extraconfig in alloy-singleton for scraping rule
but i don't know how to use dynamic variable in extraconfig
this is my values.yaml
when i render values.yaml , "{{ $.Values.cluster.name }}" can not render to dynamic values

if you have a solution let me know ( when i use v1 , I had no problem )

...
  alloy-singleton:
    enabled: true
    alloy:
      enableReporting: false
    extraConfig: |-
      mimir.rules.kubernetes "default" {
          address = "{{ .Values.address}}"
          tenant_id = "anonymous"
          mimir_namespace_prefix = "{{ $.Values.cluster.name }}"
          rule_selector {
              match_labels = {
                  rule_group = "lgtm_group",
              }
          }
      }
...
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

1 participant