added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
apiVersion: v2
name: alertmanager
description: The Alertmanager handles alerts sent by client applications such as the Prometheus server.
home: https://prometheus.io/
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
sources:
- https://github.com/prometheus/alertmanager
type: application
version: 0.33.1
appVersion: v0.25.0
kubeVersion: ">=1.16.0-0"
keywords:
- monitoring
maintainers:
- name: monotek
email: monotek23@gmail.com
- name: naseemkullah
email: naseem@transit.app
annotations:
"artifacthub.io/links": |
- name: Chart Source
url: https://github.com/prometheus-community/helm-charts
+56
View File
@@ -0,0 +1,56 @@
# Alertmanager
As per [prometheus.io documentation](https://prometheus.io/docs/alerting/latest/alertmanager/):
> The Alertmanager handles alerts sent by client applications such as the
> Prometheus server. It takes care of deduplicating, grouping, and routing them
> to the correct receiver integration such as email, PagerDuty, or OpsGenie. It
> also takes care of silencing and inhibition of alerts.
## Prerequisites
Kubernetes 1.14+
## Get Repository Info
```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
```
_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
## Install Chart
```console
helm install [RELEASE_NAME] prometheus-community/alertmanager
```
_See [configuration](#configuration) below._
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
## Uninstall Chart
```console
helm uninstall [RELEASE_NAME]
```
This removes all the Kubernetes components associated with the chart and deletes the release.
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
## Upgrading Chart
```console
helm upgrade [RELEASE_NAME] [CHART] --install
```
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
## Configuration
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
```console
helm show values prometheus-community/alertmanager
```
@@ -0,0 +1,2 @@
configmapReload:
enabled: true
@@ -0,0 +1,231 @@
global:
route:
repeat_interval: 60m
receiver: alerts
group_by: ['groupId', 'name', 'envoy_cluster_name', 'namespace', 'pod', 'service', 'instance', 'subnet_id', 'cluster']
routes:
- match:
team: sre
receiver: 'eks-common-alerts'
- match:
alertgroup: farmiso_gke
receiver: 'farmiso-devops-alerts'
- match_re:
job: .*(kube-state-metrics-).*
receiver: 'eks-common-alerts'
- match:
alerts: farmiso-devops-alerts
receiver: 'farmiso-devops-alerts'
- match_re:
dbinstance_identifier: "(bac-p-farmiso|bac-p-farmiso-slave-01)"
receiver: 'farmiso-devops-alerts'
- match_re:
cache_cluster_id: .*(front-p-farmiso).*
receiver: 'farmiso-devops-alerts'
- match_re:
target_group: .*(targetgroup/bac-p-edge-proxy-farmiso-ext-tg).*
receiver: 'farmiso-devops-alerts'
receivers:
- name: 'alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R011TWRG2LB13YBEOPNKJ7EI11LQXYGU
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }} - {{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
- name: 'farmiso-devops-alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#farmiso-devops-alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- name: 'growth-infra-engagement-infra-transact-infra-farmiso-devops-common-alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#growth-infra-alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- api_url: "https://hooks.slack.com/services/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"
channel: "#transact-infra-alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- api_url: "https://hooks.slack.com/services/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"
channel: "#engagement-infra-alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- api_url: "https://hooks.slack.com/services/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"
channel: "#farmiso-devops-alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
- name: 'eks-common-alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#eks-common-alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R011TWRG2LB13YBEOPNKJ7EI11LQXYGU
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }} - {{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
templates:
- '/etc/alertmanager/template/gchat.tmpl'
@@ -0,0 +1,415 @@
global:
route:
repeat_interval: 60m
receiver: alerts
group_by: ['database_id','name','groupId','exported_cluster','envoy_cluster_name', 'namespace', 'pod', 'service', 'instance', 'subnet_id', 'alertname','cluster']
routes:
- match:
orchestration_id: 67a9c6bb-1b06-4768-8f62-1c644f4e7b32
receiver: 'event-orchestration-1'
continue: false
- match:
orchestration_id: 7d616e74-1292-4cf1-8b5c-4741886f9d4b
receiver: 'event-orchestration-2'
continue: false
# Heap-dump automation: alerts opted in with the label heap_dump="true" are POSTed to
# Jenkins (heap-dump-job-go-auto) via the Generic Webhook Trigger plugin. continue:true so
# the alert ALSO flows through to its normal Slack/PagerDuty routing below.
# Grouped by pod+cluster -> one webhook (one build) per affected pod.
# repeat_interval:12h throttles re-triggers so a long-firing alert does not re-dump hourly.
- match:
heap_dump: "true"
receiver: 'jenkins-heap-dump'
continue: true
group_by: ['pod', 'cluster']
repeat_interval: 12h
- match_re:
alertname: .*(?i)uptime.*
receiver: 'gke-service-alerts-rcd'
- match_re:
alertname: System-Uptime-Stateless.*
receiver: 'uptime-alerts'
- match_re:
groupname: .*-uptime
receiver: 'gke-service-alerts-rcd'
- match_re:
alertname: .*_GKE.*
receiver: 'gke-service-alerts-rcd'
- match_re:
groupname: k8s-.*
receiver: 'gke-service-alerts'
- match:
service_type: kafka
receiver: 'gke-service-alerts-kafka'
- match_re:
groupname: k8s.*
receiver: 'gke-service-alerts'
- match_re:
groupname: redis.*
receiver: 'gke-service-alerts'
- match_re:
groupname: db.*
receiver: 'gke-service-alerts'
- match_re:
groupname: bigtable.*
receiver: 'gke-service-alerts'
- match_re:
groupname: scylla.*
receiver: 'gke-service-alerts'
- match_re:
groupname: mongo.*
receiver: 'gke-service-alerts'
- match_re:
groupname: elastic.*
receiver: 'gke-service-alerts'
- match_re:
groupname: vm.*
receiver: 'gke-service-alerts'
receivers:
- name: 'alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R02HMNATHTKHIN9N1SV5B72R412GFGZ6
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }} - {{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.section }}{{ if eq (index .Alerts 0).Labels.section "" }}{{ (index .Alerts 0).Labels.label_section }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
- name: 'uptime-alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R02C33YDLWHWMSPDZI4ESLOXM1NGRN3H
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority_v2 }}{{ if eq (index .Alerts 0).Labels.priority_v2 "" }}{{ (index .Alerts 0).Labels.label_priority_v2 }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }} - {{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }} - {{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_envoy_cluster_name: '{{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_primary_owner: '{{ (index .Alerts 0).Labels.primary_owner }}'
meesho_secondry_owner: '{{ (index .Alerts 0).Labels.secondry_owner }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_service_type: '{{ (index .Alerts 0).Labels.service_type }}'
meesho_priority_v2: '{{ (index .Alerts 0).Labels.priority_v2 }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
- name: 'gke-service-alerts'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R02HMNATHTKHIN9N1SV5B72R412GFGZ6
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.section }}{{ if eq (index .Alerts 0).Labels.section "" }}{{ (index .Alerts 0).Labels.label_section }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_envoy_cluster_name: '{{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_primary_owner: '{{ (index .Alerts 0).Labels.primary_owner }}'
meesho_secondary_owner: '{{ (index .Alerts 0).Labels.secondary_owner }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
- name: 'event-orchestration-1'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R025U1EEEU74A2UQ74EYFX0TF0QC4CO5
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.section }}{{ if eq (index .Alerts 0).Labels.section "" }}{{ (index .Alerts 0).Labels.label_section }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_envoy_cluster_name: '{{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_primary_owner: '{{ (index .Alerts 0).Labels.primary_owner }}'
meesho_secondary_owner: '{{ (index .Alerts 0).Labels.secondary_owner }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
webhook_configs:
- url: http://autonomous-incident-copilot.prd.meesho.int/api/ingest_alerts
send_resolved: false
- name: 'event-orchestration-2'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R02CIUHCGMHEJU2UUQ61IILPP0B7S47C
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.section }}{{ if eq (index .Alerts 0).Labels.section "" }}{{ (index .Alerts 0).Labels.label_section }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_envoy_cluster_name: '{{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_primary_owner: '{{ (index .Alerts 0).Labels.primary_owner }}'
meesho_secondary_owner: '{{ (index .Alerts 0).Labels.secondary_owner }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
webhook_configs:
- url: http://autonomous-incident-copilot.prd.meesho.int/api/ingest_alerts
send_resolved: false
# Triggers the Jenkins heap-dump-job-go-auto job (alert-driven clone of heap-dump-job-go,
# runs on jenkins-prd in the 'jenkins' namespace). The Generic Webhook Trigger plugin reads
# the alert JSON; the job's GenericTrigger maps $.commonLabels.{bu,service,pod} into build
# params. ?token= MUST equal the job's trigger token. Targets the in-cluster Service.
- name: 'jenkins-heap-dump'
webhook_configs:
- url: 'http://jenkins-prd.jenkins.svc.cluster.local:8080/generic-webhook-trigger/invoke?token=heap-dump-job-go-auto'
send_resolved: false
- name: 'gke-service-alerts-kafka'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R02HMNATHTKHIN9N1SV5B72R412GFGZ6
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.section }}{{ if eq (index .Alerts 0).Labels.section "" }}{{ (index .Alerts 0).Labels.label_section }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_envoy_cluster_name: '{{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_primary_owner: '{{ (index .Alerts 0).Labels.primary_owner }}'
meesho_secondary_owner: '{{ (index .Alerts 0).Labels.secondary_owner }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
- name: 'gke-service-alerts-rcd'
slack_configs:
- api_url: "https://hooks.slack.com/services/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"
channel: "#alerts"
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Status:* `{{ .Status | toUpper }}`
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Description:* {{ .Annotations.description }}
{{ end }}
pagerduty_configs:
- url: https://events.pagerduty.com/v2/enqueue
routing_key: R02HMNATHTKHIN9N1SV5B72R412GFGZ6
send_resolved: true
client: AlertManager
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }}'
severity: '{{ (index .Alerts 0).Labels.severity }}'
class: '{{ (index .Alerts 0).Labels.alertname }}'
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
group: '{{ (index .Alerts 0).Labels.section }}{{ if eq (index .Alerts 0).Labels.section "" }}{{ (index .Alerts 0).Labels.label_section }}{{ end }}'
details:
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
description: '{{ (index .Alerts 0).Annotations.description }}'
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
meesho_envoy_cluster_name: '{{ (index .Alerts 0).Labels.envoy_cluster_name | reReplaceAll "_.*" "" | reReplaceAll "prd-" "" }}{{ if eq (index .Alerts 0).Labels.envoy_cluster_name "" }}{{ (index .Alerts 0).Labels.service }}{{ end }}'
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
meesho_primary_owner: '{{ (index .Alerts 0).Labels.primary_owner }}'
meesho_secondary_owner: '{{ (index .Alerts 0).Labels.secondary_owner }}'
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
meesho_z_all: |
{{ range (index .Alerts 0).Labels.SortedPairs }}
• {{ .Name }}: {{ .Value }}
{{ end }}
firing: ''
templates:
- '/etc/alertmanager/template/gchat.tmpl'
@@ -0,0 +1,21 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ include "alertmanager.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "alertmanager.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ include "alertmanager.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ include "alertmanager.namespace" . }} svc -w {{ include "alertmanager.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ include "alertmanager.namespace" . }} {{ include "alertmanager.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ include "alertmanager.namespace" . }} -l "app.kubernetes.io/name={{ include "alertmanager.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:{{ .Values.service.port }} to use your application"
kubectl --namespace {{ include "alertmanager.namespace" . }} port-forward $POD_NAME {{ .Values.service.port }}:80
{{- end }}
@@ -0,0 +1,157 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "alertmanager.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Maintainer - Akshay Gupta
Tolerations and nodeSelector via Resources Requests.
*/}}
{{- define "meesho.getCpu" -}}
{{- $cpu := toString .Values.resources.requests.cpu -}}
{{- if contains "m" $cpu -}}
{{- $cpu := trimAll "m" $cpu | float64 -}}
{{- $cpu := $cpu | float64 -}}
{{- printf "%f" $cpu -}}
{{- else -}}
{{- $cpu := mulf $cpu 1000.000 -}}
{{- printf "%f" $cpu -}}
{{- end -}}
{{- end -}}
{{- define "meesho.getMem" -}}
{{- $mem := toString .Values.resources.requests.memory -}}
{{- if contains "Mi" $mem -}}
{{- $mem := trimAll "Mi" $mem | float64 -}}
{{- printf "%f" $mem -}}
{{- else if contains "Gi" $mem -}}
{{- $mem := trimAll "Gi" $mem | float64 -}}
{{- $mem := mulf $mem 1024.000 -}}
{{- printf "%f" $mem -}}
{{- end -}}
{{- end -}}
{{- define "meesho.getRatio" -}}
{{- $cpu := (include "meesho.getCpu" .) -}}
{{- $mem := (include "meesho.getMem" .) -}}
{{- $ratio := divf $mem $cpu -}}
{{- if gt $ratio 4.00 -}}
{{- printf "1to8" -}}
{{- else if gt $ratio 2.00 -}}
{{- printf "1to4" -}}
{{- else -}}
{{- printf "1to2" -}}
{{- end -}}
{{- end -}}
{{- define "meesho.dedicatedValue" -}}
{{- if (index .Values.labels "arch") -}}
{{- if (index .Values.labels "runpod") -}}
{{- $cpu := (include "meesho.getCpu" .) -}}
{{- $mem := (include "meesho.getMem" .) -}}
{{- $ratio := (include "meesho.getRatio" .) -}}
{{- $arch := .Values.labels.arch -}}
{{- $runPod := .Values.labels.runpod -}}
{{- printf "%s-%s-%s" $ratio $arch $runPod -}}
{{- else -}}
{{- printf "missing-runpod-label" -}}
{{- end -}}
{{- else -}}
{{- printf "missing-arch-label" -}}
{{- end -}}
{{/*- printf "%s-%s-%s-%s-%s" $ratio $arch $runPod $cpu $mem -*/}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "alertmanager.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "alertmanager.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "alertmanager.labels" -}}
helm.sh/chart: {{ include "alertmanager.chart" . }}
{{ include "alertmanager.selectorLabels" . }}
{{- with .Chart.AppVersion }}
app.kubernetes.io/version: {{ . | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "alertmanager.selectorLabels" -}}
app.kubernetes.io/name: {{ include "alertmanager.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "alertmanager.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "alertmanager.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Define Ingress apiVersion
*/}}
{{- define "alertmanager.ingress.apiVersion" -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- printf "networking.k8s.io/v1" }}
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
{{- printf "networking.k8s.io/v1beta1" }}
{{- else }}
{{- printf "extensions/v1beta1" }}
{{- end }}
{{- end }}
{{/*
Define Pdb apiVersion
*/}}
{{- define "alertmanager.pdb.apiVersion" -}}
{{- if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
{{- printf "policy/v1" }}
{{- else }}
{{- printf "policy/v1beta1" }}
{{- end }}
{{- end }}
{{/*
Allow overriding alertmanager namespace
*/}}
{{- define "alertmanager.namespace" -}}
{{- if .Values.namespaceOverride -}}
{{- .Values.namespaceOverride -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,20 @@
{{- if and (.Values.config) (eq .Values.configMap "") }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "alertmanager.fullname" . }}
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.configAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
data:
alertmanager.yml: |
{{- toYaml .Values.config | default "{}" | nindent 4 }}
{{- range $key, $value := .Values.templates }}
{{ $key }}: |-
{{- $value | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,56 @@
{{- if .Values.ingress.enabled }}
{{- $fullName := include "alertmanager.fullname" . }}
{{- $svcPort := .Values.service.port }}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
apiVersion: {{ include "alertmanager.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "alertmanager.fullname" . }}-config
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.configAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
data:
{{ (.Files.Glob "configmap/alertmanager.yml").AsConfig | nindent 2 }}
@@ -0,0 +1,14 @@
{{- if .Values.podDisruptionBudget }}
apiVersion: {{ include "alertmanager.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "alertmanager.fullname" . }}
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
namespace: {{ include "alertmanager.namespace" . }}
spec:
selector:
matchLabels:
{{- include "alertmanager.selectorLabels" . | nindent 6 }}
{{- toYaml .Values.podDisruptionBudget | nindent 2 }}
{{- end }}
@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "alertmanager.serviceAccountName" . }}
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
{{- end }}
@@ -0,0 +1,59 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "alertmanager.fullname" . }}
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
spec:
type: {{ .Values.service.type }}
{{- with .Values.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- range $cidr := . }}
- {{ $cidr }}
{{- end }}
{{- end }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if (and (eq .Values.service.type "NodePort") .Values.service.nodePort) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector:
{{- include "alertmanager.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "alertmanager.fullname" . }}-headless
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
namespace: {{ include "alertmanager.namespace" . }}
spec:
clusterIP: None
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if or (gt (int .Values.replicaCount) 1) (.Values.additionalPeers) }}
- port: {{ .Values.service.clusterPort }}
targetPort: {{ .Values.service.clusterPort }}
protocol: TCP
name: cluster-tcp
- port: {{ .Values.service.clusterPort }}
targetPort: {{ .Values.service.clusterPort }}
protocol: UDP
name: cluster-udp
{{- end }}
selector:
{{- include "alertmanager.selectorLabels" . | nindent 4 }}
@@ -0,0 +1,241 @@
{{- $svcClusterPort := .Values.service.clusterPort }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "alertmanager.fullname" . }}
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.statefulSet.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "alertmanager.selectorLabels" . | nindent 6 }}
serviceName: {{ include "alertmanager.fullname" . }}-headless
template:
metadata:
labels:
{{- include "alertmanager.selectorLabels" . | nindent 8 }}
{{- with .Values.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if not .Values.configmapReload.enabled }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "alertmanager.serviceAccountName" . }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if or .Values.podAntiAffinity .Values.affinity }}
affinity:
{{- end }}
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if eq .Values.podAntiAffinity "hard" }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: {{ .Values.podAntiAffinityTopologyKey }}
labelSelector:
matchExpressions:
- {key: app.kubernetes.io/name, operator: In, values: [{{ include "alertmanager.name" . }}]}
{{- else if eq .Values.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: {{ .Values.podAntiAffinityTopologyKey }}
labelSelector:
matchExpressions:
- {key: app.kubernetes.io/name, operator: In, values: [{{ include "alertmanager.name" . }}]}
{{- end }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"
{{- end }}
nodeSelector:
{{- if .Values.dedicatedValue }}
dedicated: {{ include "meesho.dedicatedValue" . }}
{{- else }}
{{- with .Values.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
tolerations:
{{- if .Values.dedicatedValue }}
- key: "dedicated"
operator: "Equal"
value: {{ include "meesho.dedicatedValue" . }}
effect: "NoSchedule"
{{- else }}
{{- with .Values.tolerations }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
{{- if .Values.configmapReload.enabled }}
- name: {{ .Chart.Name }}-{{ .Values.configmapReload.name }}
image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}"
imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}"
args:
- --volume-dir=/etc/alertmanager
- --webhook-url=http://127.0.0.1:9093/-/reload
resources:
{{- toYaml .Values.configmapReload.resources | nindent 12 }}
{{- with .Values.configmapReload.containerPort }}
ports:
- containerPort: {{ . }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/alertmanager
{{- end }}
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: TZ
value: Asia/Kolkata
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 12 }}
{{- end }}
{{- with .Values.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
args:
- --storage.path=/alertmanager
- --config.file=/etc/alertmanager/alertmanager.yml
{{- if or (gt (int .Values.replicaCount) 1) (.Values.additionalPeers) }}
- --cluster.advertise-address=[$(POD_IP)]:{{ $svcClusterPort }}
- --cluster.listen-address=0.0.0.0:{{ $svcClusterPort }}
{{- end }}
{{- if gt (int .Values.replicaCount) 1}}
{{- $fullName := include "alertmanager.fullname" . }}
{{- range $i := until (int .Values.replicaCount) }}
- --cluster.peer={{ $fullName }}-{{ $i }}.{{ $fullName }}-headless:{{ $svcClusterPort }}
{{- end }}
{{- end }}
{{- if .Values.additionalPeers }}
{{- range $item := .Values.additionalPeers }}
- --cluster.peer={{ $item }}
{{- end }}
{{- end }}
{{- range $key, $value := .Values.extraArgs }}
- --{{ $key }}={{ $value }}
{{- end }}
ports:
- name: http
containerPort: 9093
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if or (.Values.config) (ne .Values.configMap "") }}
- name: config
mountPath: /etc/alertmanager
{{- end }}
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath }}
readOnly: {{ .readOnly }}
{{- end }}
- name: storage
mountPath: /alertmanager
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if (eq .Values.configMap "") }}
- name: config
configMap:
name: {{ include "alertmanager.fullname" . }}
{{- else }}
- name: config
configMap:
name: {{ .Values.configMap }}
{{- end }}
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
secret:
secretName: {{ .secretName }}
{{- with .optional }}
optional: {{ . }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.persistence.storageClass }}
{{- end }}
{{- end }}
{{- else }}
- name: storage
emptyDir: {}
{{- end }}
@@ -0,0 +1,20 @@
{{- if .Values.testFramework.enabled }}
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "alertmanager.fullname" . }}-test-connection"
labels:
{{- include "alertmanager.labels" . | nindent 4 }}
{{- with .Values.testFramework.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ include "alertmanager.namespace" . }}
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "alertmanager.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
{{- end }}
@@ -0,0 +1,48 @@
should match snapshot of default values:
1: |
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: alertmanager
app.kubernetes.io/version: 1.0.0
helm.sh/chart: alertmanager-1.0.0
name: RELEASE-NAME-alertmanager
spec:
ingressClassName: nginx-test
rules:
- host: alertmanager.domain.com
http:
paths:
- backend:
service:
name: RELEASE-NAME-alertmanager
port:
number: 9093
path: /
pathType: ImplementationSpecific
should match snapshot of default values with old kubernetes ingress:
1: |
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx-test
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: alertmanager
app.kubernetes.io/version: 1.0.0
helm.sh/chart: alertmanager-1.0.0
name: RELEASE-NAME-alertmanager
spec:
rules:
- host: alertmanager.domain.com
http:
paths:
- backend:
serviceName: RELEASE-NAME-alertmanager
servicePort: 9093
path: /
@@ -0,0 +1,81 @@
suite: test ingress
templates:
- ingress.yaml
tests:
- it: should be empty if ingress is not enabled
asserts:
- hasDocuments:
count: 0
- it: should have apiVersion extensions/v1beta1 for k8s < 1.14
set:
ingress.enabled: true
capabilities:
majorVersion: 1
minorVersion: 13
asserts:
- hasDocuments:
count: 1
- isKind:
of: Ingress
- isAPIVersion:
of: extensions/v1beta1
- it: should have apiVersion networking.k8s.io/v1beta1 for k8s < 1.19
set:
ingress.enabled: true
capabilities:
majorVersion: 1
minorVersion: 18
asserts:
- hasDocuments:
count: 1
- isKind:
of: Ingress
- isAPIVersion:
of: networking.k8s.io/v1beta1
- it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.19
set:
ingress.enabled: true
capabilities:
majorVersion: 1
minorVersion: 19
asserts:
- hasDocuments:
count: 1
- isKind:
of: Ingress
- isAPIVersion:
of: networking.k8s.io/v1
- it: should have an ingressClassName for k8s >= 1.19
set:
ingress.enabled: true
ingress.className: nginx-test
capabilities:
majorVersion: 1
minorVersion: 19
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.ingressClassName
value: nginx-test
- it: should match snapshot of default values
set:
ingress.enabled: true
ingress.className: nginx-test
chart:
version: 1.0.0
appVersion: 1.0.0
asserts:
- matchSnapshot: { }
- it: should match snapshot of default values with old kubernetes ingress
set:
ingress.enabled: true
ingress.className: nginx-test
capabilities:
majorVersion: 1
minorVersion: 17
chart:
version: 1.0.0
appVersion: 1.0.0
asserts:
- matchSnapshot: { }
@@ -0,0 +1,911 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "alertmanager",
"description": "The Alertmanager handles alerts sent by client applications such as the Prometheus server.",
"type": "object",
"required": [
"replicaCount",
"image",
"serviceAccount",
"service",
"persistence",
"config"
],
"definitions": {
"image": {
"description": "Container image parameters.",
"type": "object",
"required": ["repository"],
"additionalProperties": false,
"properties": {
"repository": {
"description": "Image repository. Path to the image with registry(quay.io) or without(prometheus/alertmanager) for docker.io.",
"type": "string"
},
"pullPolicy": {
"description": "Image pull policy. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.",
"type": "string",
"enum": [
"Never",
"IfNotPresent",
"Always"
],
"default": "IfNotPresent"
},
"tag": {
"description": "Use chart appVersion by default.",
"type": "string",
"default": ""
}
}
},
"resources": {
"description": "Resource limits and requests for the Container.",
"type": "object",
"properties": {
"limits": {
"description": "Resource limits for the Container.",
"type": "object",
"properties": {
"cpu": {
"description": "CPU request for the Container.",
"type": "string"
},
"memory": {
"description": "Memory request for the Container.",
"type": "string"
}
}
},
"requests": {
"description": "Resource requests for the Container.",
"type": "object",
"properties": {
"cpu": {
"description": "CPU request for the Container.",
"type": "string"
},
"memory": {
"description": "Memory request for the Container.",
"type": "string"
}
}
}
}
},
"securityContext": {
"description": "Security context for the container.",
"type": "object",
"properties": {
"capabilities": {
"description": "Specifies the capabilities to be dropped by the container.",
"type": "object",
"properties": {
"drop": {
"description": "List of capabilities to be dropped.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"readOnlyRootFilesystem": {
"description": "Specifies whether the root file system should be mounted as read-only.",
"type": "boolean"
},
"runAsUser": {
"description": "Specifies the UID (User ID) to run the container as.",
"type": "integer"
},
"runAsNonRoot": {
"description": "Specifies whether to run the container as a non-root user.",
"type": "boolean"
},
"runAsGroup": {
"description": "Specifies the GID (Group ID) to run the container as.",
"type": "integer"
}
}
},
"volumeMounts": {
"description": "List of volume mounts for the Container.",
"type": "array",
"items": {
"description": "Volume mounts for the Container.",
"type": "object",
"required": ["name", "mountPath"],
"properties": {
"name": {
"description": "The name of the volume to mount.",
"type": "string"
},
"mountPath": {
"description": "The mount path for the volume.",
"type": "string"
},
"readOnly": {
"description": "Specifies if the volume should be mounted in read-only mode.",
"type": "boolean"
}
}
}
},
"env": {
"description": "List of environment variables for the Container.",
"type": "array",
"items": {
"description": "Environment variables for the Container.",
"type": "object",
"required": ["name"],
"properties": {
"name": {
"description": "The name of the environment variable.",
"type": "string"
},
"value": {
"description": "The value of the environment variable.",
"type": "string"
}
}
}
},
"config": {
"description": "https://prometheus.io/docs/alerting/latest/configuration/",
"duration": {
"type": "string",
"pattern": "^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$"
},
"labelname": {
"type": "string",
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$|^...$"
},
"route": {
"description": "Alert routing configuration.",
"type": "object",
"properties": {
"receiver": {
"description": "The default receiver to send alerts to.",
"type": "string"
},
"group_by": {
"description": "The labels by which incoming alerts are grouped together.",
"type": "array",
"items": {
"type": "string",
"$ref": "#/definitions/config/labelname"
}
},
"continue": {
"description": "Whether an alert should continue matching subsequent sibling nodes.",
"type": "boolean",
"default": false
},
"matchers": {
"description": "A list of matchers that an alert has to fulfill to match the node.",
"type": "array",
"items": {
"type": "string"
}
},
"group_wait": {
"description": "How long to initially wait to send a notification for a group of alerts.",
"$ref": "#/definitions/config/duration"
},
"group_interval": {
"description": "How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent.",
"$ref": "#/definitions/config/duration"
},
"repeat_interval": {
"description": "How long to wait before sending a notification again if it has already been sent successfully for an alert.",
"$ref": "#/definitions/config/duration"
},
"mute_time_intervals": {
"description": "Times when the route should be muted.",
"type": "array",
"items": {
"type": "string"
}
},
"active_time_intervals": {
"description": "Times when the route should be active.",
"type": "array",
"items": {
"type": "string"
}
},
"routes": {
"description": "Zero or more child routes.",
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/config/route"
}
}
}
}
}
},
"properties": {
"replicaCount": {
"description": "Number of desired pods.",
"type": "integer",
"default": 1,
"minimum": 0
},
"image": {
"description": "Container image parameters.",
"$ref": "#/definitions/image"
},
"extraArgs": {
"description": "Additional alertmanager container arguments. Use args without '--', only 'key: value' syntax.",
"type": "object",
"default": {}
},
"extraSecretMounts": {
"description": "Additional Alertmanager Secret mounts.",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": ["name", "mountPath", "secretName"],
"properties": {
"name": {
"type": "string"
},
"mountPath": {
"type": "string"
},
"subPath": {
"type": "string",
"default": ""
},
"secretName": {
"type": "string"
},
"readOnly": {
"type": "boolean",
"default": false
}
}
}
},
"imagePullSecrets": {
"description": "The property allows you to configure multiple image pull secrets.",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"description": "Specifies the Secret name of the image pull secret.",
"type": "string"
}
}
}
},
"nameOverride": {
"description": "Override value for the name of the Helm chart.",
"type": "string",
"default": ""
},
"fullnameOverride": {
"description": "Override value for the fully qualified app name.",
"type": "string",
"default": ""
},
"namespaceOverride": {
"description": "Override deployment namespace.",
"type": "string",
"default": ""
},
"automountServiceAccountToken": {
"description": "Specifies whether to automatically mount the ServiceAccount token into the Pod's filesystem.",
"type": "boolean",
"default": true
},
"serviceAccount": {
"description": "Contains properties related to the service account configuration.",
"type": "object",
"required": ["create"],
"properties": {
"create": {
"description": "Specifies whether a service account should be created.",
"type": "boolean",
"default": true
},
"annotations": {
"description": "Annotations to add to the service account.",
"type": "object",
"default": {}
},
"name": {
"description": "The name of the service account to use. If not set and create is true, a name is generated using the fullname template.",
"type": "string",
"default": ""
}
}
},
"schedulerName": {
"description": "Sets the schedulerName in the alertmanager pod.",
"type": "string",
"default": ""
},
"priorityClassName": {
"description": "Sets the priorityClassName in the alertmanager pod.",
"type": "string",
"default": ""
},
"podSecurityContext": {
"description": "Pod security context configuration.",
"type": "object",
"properties": {
"fsGroup": {
"description": "The fsGroup value for the pod's security context.",
"type": "integer",
"default": 65534
},
"runAsUser": {
"description": "The UID to run the pod's containers as.",
"type": "integer"
},
"runAsGroup": {
"description": "The GID to run the pod's containers as.",
"type": "integer"
}
}
},
"dnsConfig": {
"description": "DNS configuration for the pod.",
"type": "object",
"properties": {
"nameservers": {
"description": "List of DNS server IP addresses.",
"type": "array",
"items": {
"type": "string"
}
},
"searches": {
"description": "List of DNS search domains.",
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"description": "List of DNS options.",
"type": "array",
"items": {
"description": "DNS options.",
"type": "object",
"required": ["name"],
"properties": {
"name": {
"description": "The name of the DNS option.",
"type": "string"
},
"value": {
"description": "The value of the DNS option.",
"type": "string"
}
}
}
}
}
},
"hostAliases": {
"description": "List of host aliases.",
"type": "array",
"items": {
"description": "Host aliases configuration.",
"type": "object",
"required": ["ip", "hostnames"],
"properties": {
"ip": {
"description": "IP address associated with the host alias.",
"type": "string"
},
"hostnames": {
"description": "List of hostnames associated with the IP address.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"securityContext": {
"description": "Security context for the container.",
"$ref": "#/definitions/securityContext"
},
"additionalPeers": {
"description": "Additional peers for a alertmanager.",
"type": "array",
"items": {
"type": "string"
}
},
"extraInitContainers": {
"description": "Additional InitContainers to initialize the pod.",
"type": "array",
"default": [],
"items": {
"required": ["name", "image"],
"properties": {
"name": {
"description": "The name of the InitContainer.",
"type": "string"
},
"image": {
"description": "The container image to use for the InitContainer.",
"type": "string"
},
"pullPolicy": {
"description": "Image pull policy. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.",
"type": "string",
"enum": [
"Never",
"IfNotPresent",
"Always"
],
"default": "IfNotPresent"
},
"command": {
"description": "The command to run in the InitContainer.",
"type": "array",
"items": {
"type": "string"
}
},
"args": {
"description": "Additional command arguments for the InitContainer.",
"type": "array",
"items": {
"type": "string"
}
},
"ports": {
"description": "List of ports to expose from the container.",
"type": "array",
"items": {
"type": "object"
}
},
"env": {
"description": "List of environment variables for the InitContainer.",
"$ref": "#/definitions/env"
},
"envFrom": {
"description": "List of sources to populate environment variables in the container.",
"type": "array",
"items": {
"type": "object"
}
},
"volumeMounts": {
"description": "List of volume mounts for the InitContainer.",
"$ref": "#/definitions/volumeMounts"
},
"resources": {
"description": "Resource requirements for the InitContainer.",
"$ref": "#/definitions/resources"
},
"securityContext": {
"$ref": "#/definitions/securityContext",
"description": "The security context for the InitContainer."
}
}
}
},
"extraContainers": {
"description": "Additional containers to add to the stateful set.",
"type": "array",
"default": [],
"items": {
"required": ["name", "image"],
"properties": {
"name": {
"description": "The name of the InitContainer.",
"type": "string"
},
"image": {
"description": "The container image to use for the InitContainer.",
"type": "string"
},
"pullPolicy": {
"description": "Image pull policy. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.",
"type": "string",
"enum": [
"Never",
"IfNotPresent",
"Always"
],
"default": "IfNotPresent"
},
"command": {
"description": "The command to run in the InitContainer.",
"type": "array",
"items": {
"type": "string"
}
},
"args": {
"description": "Additional command arguments for the InitContainer.",
"type": "array",
"items": {
"type": "string"
}
},
"ports": {
"description": "List of ports to expose from the container.",
"type": "array",
"items": {
"type": "object"
}
},
"env": {
"description": "List of environment variables for the InitContainer.",
"$ref": "#/definitions/env"
},
"envFrom": {
"description": "List of sources to populate environment variables in the container.",
"type": "array",
"items": {
"type": "object"
}
},
"volumeMounts": {
"description": "List of volume mounts for the InitContainer.",
"$ref": "#/definitions/volumeMounts"
},
"resources": {
"description": "Resource requirements for the InitContainer.",
"$ref": "#/definitions/resources"
},
"securityContext": {
"$ref": "#/definitions/securityContext",
"description": "The security context for the InitContainer."
}
}
}
},
"resources": {
"description": "Resource limits and requests for the pod.",
"$ref": "#/definitions/resources"
},
"livenessProbe": {
"description": "Liveness probe configuration.",
"type": "object"
},
"readinessProbe": {
"description": "Readiness probe configuration.",
"type": "object"
},
"service": {
"description": "Service configuration.",
"type": "object",
"required": ["type", "port"],
"properties": {
"annotations": {
"description": "Annotations to add to the service.",
"type": "object"
},
"type": {
"description": "Service type.",
"type": "string"
},
"port": {
"description": "Port number for the service.",
"type": "integer"
},
"clusterPort": {
"description": "Port number for the cluster.",
"type": "integer"
},
"loadBalancerIP": {
"description": "External IP to assign when the service type is LoadBalancer.",
"type": "string"
},
"loadBalancerSourceRanges": {
"description": "IP ranges to allow access to the loadBalancerIP.",
"type": "array",
"items": {
"type": "string"
}
},
"nodePort": {
"description": "Specific nodePort to force when service type is NodePort.",
"type": "integer"
}
}
},
"ingress": {
"description": "Ingress configuration.",
"type": "object",
"properties": {
"enabled": {
"description": "Indicates if Ingress is enabled.",
"type": "boolean"
},
"className": {
"description": "Ingress class name.",
"type": "string"
},
"annotations": {
"description": "Annotations to add to the Ingress.",
"type": "object"
},
"hosts": {
"description": "Host and path configuration for the Ingress.",
"type": "array",
"items": {
"type": "object",
"properties": {
"host": {
"description": "Host name for the Ingress.",
"type": "string"
},
"paths": {
"description": "Path configuration for the Ingress.",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"description": "Path for the Ingress.",
"type": "string"
},
"pathType": {
"description": "Path type for the Ingress.",
"type": "string"
}
}
}
}
}
}
},
"tls": {
"description": "TLS configuration for the Ingress.",
"type": "array",
"items": {
"type": "object",
"properties": {
"secretName": {
"description": "Name of the secret for TLS.",
"type": "string"
},
"hosts": {
"description": "Host names for the TLS configuration.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"nodeSelector": {
"description": "Node selector for pod assignment.",
"type": "object"
},
"tolerations": {
"description": "Tolerations for pod assignment.",
"type": "array"
},
"affinity": {
"description": "Affinity rules for pod assignment.",
"type": "object"
},
"podAntiAffinity": {
"description": "Pod anti-affinity configuration.",
"type": "string",
"enum": ["", "soft", "hard"],
"default": ""
},
"podAntiAffinityTopologyKey": {
"description": "Topology key to use for pod anti-affinity.",
"type": "string"
},
"topologySpreadConstraints": {
"description": "Topology spread constraints for pod assignment.",
"type": "array",
"items": {
"type": "object",
"required": ["maxSkew", "topologyKey", "whenUnsatisfiable", "labelSelector"],
"properties": {
"maxSkew": {
"type": "integer"
},
"topologyKey": {
"type": "string"
},
"whenUnsatisfiable": {
"type": "string",
"enum": ["DoNotSchedule", "ScheduleAnyway"]
},
"labelSelector": {
"type": "object",
"required": ["matchLabels"],
"properties": {
"matchLabels": {
"type": "object"
}
}
}
}
}
},
"statefulSet": {
"description": "StatefulSet configuration for managing pods.",
"type": "object",
"properties": {
"annotations": {
"type": "object"
}
}
},
"podAnnotations": {
"description": "Annotations to add to the pods.",
"type": "object"
},
"podLabels": {
"description": "Labels to add to the pods.",
"type": "object"
},
"podDisruptionBudget": {
"description": "Pod disruption budget configuration.",
"type": "object",
"properties": {
"maxUnavailable": {
"type": "integer"
},
"minAvailable": {
"type": "integer"
}
}
},
"command": {
"description": "The command to be executed in the container.",
"type": "array",
"items": {
"type": "string"
}
},
"persistence": {
"description": "Persistence configuration for storing data.",
"type": "object",
"required": ["enabled", "size"],
"properties": {
"enabled": {
"type": "boolean"
},
"storageClass": {
"type": "string"
},
"accessModes": {
"type": "array",
"items": {
"type": "string"
}
},
"size": {
"type": "string"
}
}
},
"configAnnotations": {
"description": "Annotations to be added to the Alertmanager configuration.",
"type": "object"
},
"config": {
"description": "Alertmanager configuration.",
"type": "object",
"properties": {
"global": {
"description": "Global configuration options.",
"type": "object"
},
"templates": {
"description": "Alertmanager template files.",
"type": "array",
"items": {
"type": "string"
}
},
"receivers": {
"description": "Alert receivers configuration.",
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"description": "The unique name of the receiver.",
"type": "string"
}
}
}
},
"route": {
"description": "Alert routing configuration.",
"type": "object",
"$ref": "#/definitions/config/route"
}
}
},
"configmapReload": {
"description": "Monitors ConfigMap changes and POSTs to a URL.",
"type": "object",
"properties": {
"enabled": {
"description": "Specifies whether the configmap-reload container should be deployed.",
"type": "boolean",
"default": false
},
"name": {
"description": "The name of the configmap-reload container.",
"type": "string"
},
"image": {
"description": "The container image for the configmap-reload container.",
"$ref": "#/definitions/image"
},
"containerPort": {
"description": "Port number for the configmap-reload container.",
"type": "integer"
},
"resources": {
"description": "Resource requests and limits for the configmap-reload container.",
"$ref": "#/definitions/resources"
}
}
},
"templates": {
"description": "Custom templates used by Alertmanager.",
"type": "object"
},
"extraVolumeMounts": {
"description": "List of volume mounts for the Container.",
"$ref": "#/definitions/volumeMounts"
},
"extraVolumes": {
"description": "Additional volumes to be mounted in the Alertmanager pod.",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string"
}
}
}
},
"extraEnv": {
"description": "List of environment variables for the Container.",
"$ref": "#/definitions/env"
},
"testFramework": {
"description": "Configuration for the test Pod.",
"type": "object",
"properties": {
"enabled": {
"description": "Specifies whether the test Pod is enabled.",
"type": "boolean",
"default": false
},
"annotations": {
"description": "Annotations to be added to the test Pod.",
"type": "object"
}
}
}
}
}
+270
View File
@@ -0,0 +1,270 @@
# yaml-language-server: $schema=values.schema.json
# Default values for alertmanager.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: quay.io/prometheus/alertmanager
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
extraArgs: {}
## Additional Alertmanager Secret mounts
# Defines additional mounts with secrets. Secrets must be manually created in the namespace.
extraSecretMounts: []
# - name: secret-files
# mountPath: /etc/secrets
# subPath: ""
# secretName: alertmanager-secret-files
# readOnly: true
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
## namespaceOverride overrides the namespace which the resources will be deployed in
namespaceOverride: ""
automountServiceAccountToken: true
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
# Sets priorityClassName in alertmanager pod
priorityClassName: ""
# Sets schedulerName in alertmanager pod
schedulerName: ""
podSecurityContext:
fsGroup: 65534
dnsConfig: {}
# nameservers:
# - 1.2.3.4
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0
hostAliases: []
# - ip: "127.0.0.1"
# hostnames:
# - "foo.local"
# - "bar.local"
# - ip: "10.1.2.3"
# hostnames:
# - "foo.remote"
# - "bar.remote"
securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
runAsUser: 65534
runAsNonRoot: true
runAsGroup: 65534
additionalPeers: []
## Additional InitContainers to initialize the pod
##
extraInitContainers: []
## Additional containers to add to the stateful set. This will allow to setup sidecarContainers like a proxy to integrate
## alertmanager with an external tool like teams that has not direct integration.
##
extraContainers: []
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
service:
annotations: {}
type: ClusterIP
port: 9093
clusterPort: 9094
loadBalancerIP: "" # Assign ext IP when Service type is LoadBalancer
loadBalancerSourceRanges: [] # Only allow access to loadBalancerIP from these IPs
# if you want to force a specific nodePort. Must be use with service.type=NodePort
# nodePort:
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: alertmanager.domain.com
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - alertmanager.domain.com
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 10m
# memory: 32Mi
nodeSelector: {}
tolerations: []
affinity: {}
## Pod anti-affinity can prevent the scheduler from placing Alertmanager replicas on the same node.
## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided.
## The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node.
## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured.
##
podAntiAffinity: ""
## If anti-affinity is enabled sets the topologyKey to use for anti-affinity.
## This can be changed to, for example, failure-domain.beta.kubernetes.io/zone
##
podAntiAffinityTopologyKey: kubernetes.io/hostname
## Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
topologySpreadConstraints: []
# - maxSkew: 1
# topologyKey: failure-domain.beta.kubernetes.io/zone
# whenUnsatisfiable: DoNotSchedule
# labelSelector:
# matchLabels:
# app.kubernetes.io/instance: alertmanager
statefulSet:
annotations: {}
podAnnotations: {}
podLabels: {}
# Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget: {}
# maxUnavailable: 1
# minAvailable: 1
command: []
persistence:
enabled: true
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner.
##
# storageClass: "-"
accessModes:
- ReadWriteOnce
size: 50Mi
configAnnotations: {}
## For example if you want to provide private data from a secret vault
## https://github.com/banzaicloud/bank-vaults/tree/main/charts/vault-secrets-webhook
## P.s.: Add option `configMapMutation: true` for vault-secrets-webhook
# vault.security.banzaicloud.io/vault-role: "admin"
# vault.security.banzaicloud.io/vault-addr: "https://vault.vault.svc.cluster.local:8200"
# vault.security.banzaicloud.io/vault-skip-verify: "true"
# vault.security.banzaicloud.io/vault-path: "kubernetes"
## Example for inject secret
# slack_api_url: '${vault:secret/data/slack-hook-alerts#URL}'
config:
global: {}
# slack_api_url: ''
templates:
- '/etc/alertmanager/*.tmpl'
receivers:
- name: default-receiver
# slack_configs:
# - channel: '@you'
# send_resolved: true
route:
group_wait: 10s
group_interval: 5m
receiver: default-receiver
repeat_interval: 3h
## Monitors ConfigMap changes and POSTs to a URL
## Ref: https://github.com/jimmidyson/configmap-reload
##
configmapReload:
## If false, the configmap-reload container will not be deployed
##
enabled: false
## configmap-reload container name
##
name: configmap-reload
## configmap-reload container image
##
image:
repository: jimmidyson/configmap-reload
tag: v0.8.0
pullPolicy: IfNotPresent
# containerPort: 9533
## configmap-reload resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}
templates: {}
# alertmanager.tmpl: |-
## Optionally specify extra list of additional volumeMounts
extraVolumeMounts: []
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true
## Optionally specify extra list of additional volumes
extraVolumes: []
# - name: extras
# emptyDir: {}
## Optionally specify extra environment variables to add to alertmanager container
extraEnv: []
# - name: FOO
# value: BAR
testFramework:
enabled: false
annotations:
"helm.sh/hook": test-success
# "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"