GithubHelp home page GithubHelp logo

Comments (3)

Haleygo avatar Haleygo commented on June 19, 2024

Hello!
Like #930 (comment), you can add them using .Values,extraArgs

extraArgs:
  envflag.enable: "true"
  envflag.prefix: VM_
  loggerFormat: json
  
  remoteWrite.relabelConfig: test.yml
  ## remoteWrite.urlRelabelConfig: relabelDev.yml

Unlike -remoteWrite.url , -remoteWrite.relabelConfig and -remoteWrite.urlRelabelConfig point to files with relabeling configs, those files should be provided by extra configmaps or secrets.
It's better not to expose the raw config in chart's values file, since the config is normally big and not about chart itself, maintaining an extra config file would be more clear.

from helm-charts.

sushovan23 avatar sushovan23 commented on June 19, 2024

I'm using helm for entire deployment, are you suggesting to maintain this file separately? if it was for single setup I would have done but we provision many vmagents per client and manage everything currently using helm.
remotewrite.relabelconfig will be much smaller than scrapeconfigs which are already supported in helm values.

from helm-charts.

Haleygo avatar Haleygo commented on June 19, 2024

Personally, I prefer to keep the values.yaml shorter and only expose important configs there, gives higher readability.
So I'd still recommend to maintain separated file for scrapeconfigs or remotewrite.relabelconfig using configmap or secret and mount them to vmagent, as they're separated config file themselves.
If you don't want to maintain the config file outside the chart release, you can create a second values.yaml using .Values. extraObjects like

## relabelconfig.yaml
extraArgs:
  remoteWrite.relabelConfig: /relabelconfig/relabelconfig.yaml

# Extra Volumes for the pod
extraVolumes:
  - name: relabelconfig
    configMap:
      name: relabelconfig

# Extra Volume Mounts for the container
extraVolumeMounts:
  - name: relabelconfig
    mountPath: /relabelconfig

# add this part to the original values file or create a separate one for multiple release to use
# Add extra specs dynamically to this chart
extraObjects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: relabelconfig
    data:
      relabelconfig.yaml: |
        - source_labels: [__address__]
          target_label: instance
          regex: (.*)
          replacement: $1
        - xxx

And install with helm install xxx victoria-metrics-vmagent -f relabelconfig.yaml.

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.