kube-prometheus icon indicating copy to clipboard operation
kube-prometheus copied to clipboard

How to override startup args for prometheus server

Open ForcemCS opened this issue 7 months ago • 1 comments

I'm getting into prometheus, and I'm currently having problems.how to override startup args for prometheus server I am deploying prometheus using kube-prometheus-satck, how do I override the value of --storage.tsdb.path=/prometheus to --storage.tsdb.path=/prometheus/prometheus-db, I I tried the following VALUES. yaml modification, but when helm upgrade is executed, there are two configurations in the startup parameters, one for prometheus and one for prometheus-db

prometheus:
  ingress:
    enabled: true
    annotations:
      kubernetes.io/ingress.class: nginx
    hosts:
    - prom.threshold.com
    tls:
    - hosts:
      - prom.threshold.com
      secretName: prom-threshold-com
  prometheusSpec:
    additionalArgs:
    #- name: 'storage.tsdb.retention.time=15d'
    - name: 'storage.tsdb.path=/prometheus/prometheus-db'
    - name: 'storage.tsdb.max-block-duration=2h'
    - name: 'storage.tsdb.min-block-duration=2h'
    - name: 'web.enable-admin-api'
    affinity:
      nodeAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            preference:
              matchExpressions:
                - key: preferred
                  operator: In
                  values:
                    - prometheus
    storageSpec:
      volumeClaimTemplate:
        spec:
          storageClassName: local-prom-stack

ForcemCS avatar Jul 06 '24 09:07 ForcemCS