apiVersion: apps/v1
kind: Deployment
metadata:
  name: slack-notifier
  labels:
    app: slack-notifier
spec:
  replicas: 1
  selector:
    matchLabels:
      app: slack-notifier
  template:
    metadata:
      labels:
        app: slack-notifier
    spec:
      containers:
      - name: slack-notifier
        image: ghcr.io/eficode/rancher-fleet-slack-notifier:v0.1.0
        env:
        - name: SLACK_NOTIFY_URL
          valueFrom:
            secretKeyRef:
              name: slack-creds
              key: SLACK_NOTIFY_URL
        - name: RANCHER_URL
          valueFrom:
            secretKeyRef:
              name: slack-creds
              key: RANCHER_URL
        - name: RANCHER_TOKEN
          valueFrom:
            secretKeyRef:
              name: slack-creds
              key: RANCHER_TOKEN
        - name: CHECK_INTERVAL
          valueFrom:
            secretKeyRef:
              name: slack-creds
              key: CHECK_INTERVAL
        - name: NOTIF_THRESHOLD
          valueFrom:
            secretKeyRef:
              name: slack-creds
              key: NOTIF_THRESHOLD          
