0
votes

I'm using the latest version of helm chart, minikube v1.16.0, kubectl v1.20.0

I'm trying to install prometheus-kube-stack chart with a custom values.yaml file

I ran this: helm install prometheus prometheus-community/kube-prometheus-stack -f custom_values.yaml

Contents of custom_values.yaml

additionalPrometheusRulesMap:
  - groups:
    - name: custom_rules
      rules:
        - record: node_memory_MemFree_percent
          expr: 100 - (100 * node_memory_MemFree_bytes / node_memory_MemTotal_bytes)
    - name: alert_rules
      rules:
        - alert: InstanceDown
          expr: up == 0
          for: 15s
          labels:
            severity: critical
          annotations:
            summary: "Instance [{{ $labels.instance }}] down"
            description: "[{{ $labels.instance }}] of job [{{ $labels.job }}] has been down for more than 1 minute."

alertmanager:
  config:
    global:
      resolve_timeout: 5m
    route:
      group_by: ['alertname']
      receiver: 'post-webhook'
      group_interval: 30s
      repeat_interval: 30s
    receivers:
    - name: 'post-webhook'
      webhook_configs:
      - url: <my-post-url>

After running this, I ran kubectl get pod and the list doesn't have any alertmanager pod

But if I just install helm chart without passing any custom config file, pod gets created.

Am I doing something wrong?

1
You are probably overwriting the whole default configuration of alertmanager - Felipe

1 Answers

0
votes

As @Felipe mentioned, you might want to run

helm upgrade --reuse-values prometheus prometheus-community/kube-prometheus-stack  -f custom_values.yaml

to preserve the values set up by running the default helm-chart.