apiVersion: apps/v1
kind: Deployment
metadata:
  name: matrix-alertmanager
  namespace: monitoring
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: matrix-alertmanager
  template:
    metadata:
      labels:
        app.kubernetes.io/name: matrix-alertmanager
    spec:
      containers:
      - env:
        - name: MATRIX_TOKEN
          valueFrom:
            secretKeyRef:
              key: MATRIX_TOKEN
              name: matrix-token
        - name: APP_PORT
          value: "9094"
        - name: MATRIX_HOMESERVER_URL
          value: https://nerdsin.space
        - name: MATRIX_ROOMS
          value: matrix-notifications/!RbXWoszwkilTQXDBUA:nerdsin.space
        - name: MATRIX_USER
          value: '@alertmanager-k8s-235:nerdsin.space'
        - name: APP_ALERTMANAGER_SECRET
          value: whybother
        image: jaywink/matrix-alertmanager:latest
        name: matrix-alertmanager
        ports:
        - containerPort: 9094
          name: web
        resources:
          limits:
            cpu: 100m
          requests:
            cpu: 50m
