apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
  name: kube-prometheus-stack-alertmanager
  namespace: kube-prometheus-stack
  labels:
    app: kube-prometheus-stack-alertmanager
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: kube-prometheus-stack
    app.kubernetes.io/version: "81.0.0"
    app.kubernetes.io/part-of: kube-prometheus-stack
    chart: kube-prometheus-stack-81.0.0
    release: "kube-prometheus-stack"
    heritage: "Helm"
spec:
  image: "quay.io/prometheus/alertmanager:v0.30.1"
  imagePullPolicy: "IfNotPresent"
  version: v0.30.1
  replicas: 1
  listenLocal: false
  serviceAccountName: kube-prometheus-stack-alertmanager
  automountServiceAccountToken: true
  externalUrl: http://kube-prometheus-stack-alertmanager.kube-prometheus-stack:9093
  paused: false
  logFormat: "logfmt"
  logLevel: "info"
  retention: "120h"
  secrets:
    - alertmanager-config-secret
  alertmanagerConfigSelector: {}
  alertmanagerConfigNamespaceSelector: {}
  routePrefix: "/"
  securityContext:
    fsGroup: 2000
    runAsGroup: 2000
    runAsNonRoot: true
    runAsUser: 1000
    seccompProfile:
      type: RuntimeDefault
  affinity:
    podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
        - weight: 100
          podAffinityTerm:
            topologyKey: kubernetes.io/hostname
            labelSelector:
              matchExpressions:
                - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]}
                - {key: alertmanager, operator: In, values: [kube-prometheus-stack-alertmanager]}
  portName: http-web
