# Source: openfaas/templates/alertmanager-dep.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: openfaas
    component: alertmanager
    release: openfaas
  name: alertmanager
  namespace: "openfaas"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: alertmanager
  template:
    metadata:
      labels:
        app: alertmanager
      annotations:
        sidecar.istio.io/inject: "true"
        checksum/alertmanager-config: "2702429868a6065e7403548cf710acc54844fef133a5f96e4639ffd6f4e51f86"
    spec:
      containers:
        - name: alertmanager
          image: docker.io/prom/alertmanager:v0.23.0
          imagePullPolicy: Always
          command:
            - "alertmanager"
            - "--config.file=/alertmanager.yml"
            - "--storage.path=/alertmanager"
            - "--cluster.listen-address="
          livenessProbe:
            httpGet:
              path: /-/ready
              port: 9093
            timeoutSeconds: 30
          readinessProbe:
            httpGet:
              path: /-/ready
              port: 9093
            timeoutSeconds: 30
          ports:
            - containerPort: 9093
              protocol: TCP
          resources:
            limits:
              memory: 50Mi
            requests:
              memory: 25Mi
          volumeMounts:
            - mountPath: /alertmanager.yml
              name: alertmanager-config
              subPath: alertmanager.yml
      volumes:
        - name: alertmanager-config
          configMap:
            name: alertmanager-config
            items:
              - key: alertmanager.yml
                path: alertmanager.yml
                mode: 0644
