apiVersion: apps/v1
kind: Deployment
metadata:
  name: prepbot
  namespace: discord-bots
  labels:
    app: prepbot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prepbot
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 120
  template:
    metadata:
      labels:
        app: prepbot
    spec:
      containers:
        - name: prepbot
          image: <IMAGE>
          resources:
            requests:
              memory: "512Mi"
              cpu: "1"
            limits:
              memory: "1Gi"
              cpu: "2"
          env:
            - name: DISCORD_TOKEN
              valueFrom:
                secretKeyRef:
                  name: prepbot
                  key: discord_token
            - name: LINK_CHANNEL
              valueFrom:
                secretKeyRef:
                  name: prepbot
                  key: link_channel
            - name: CHAT_CHANNEL
              valueFrom:
                secretKeyRef:
                  name: prepbot
                  key: chat_channel
      imagePullSecrets:
        - name: registry-1
