apiVersion: apps/v1
kind: Deployment
metadata:
  name: alertmanager-discord
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app: alertmanager-discord
  
  template:
    metadata:
      labels:
        app: alertmanager-discord
    spec:
      containers:
      - image: chenseanxy/alertmanager-discord
        imagePullPolicy: Always
        name: main
        ports:
        - containerPort: 9094
          name: http
        resources:
          limits:
            cpu: 20m
            memory: 40Mi
          requests:
            cpu: 20m
            memory: 40Mi
        env:
        - name: DISCORD_WEBHOOK
          value: https://discord.com/api/webhooks/846816075936170054/YPQS43TwppMiMT6UHeq4rMbL2dmQMbckrU1YeCKzkvei1foMaxARhDZg1a8qy3Zl-uZE
      nodeSelector:
        kubernetes.io/os: linux
        kubernetes.io/hostname: x-k8s-0
      tolerations:
      - operator: Exists
        key: node-role.kubernetes.io/master
        effect: NoSchedule