apiVersion: apps/v1
kind: Deployment
metadata:
  name: goff
  namespace: discord-bots
  labels:
    app: goff
spec:
  replicas: 1
  selector:
    matchLabels:
      app: goff
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 120
  template:
    metadata:
      labels:
        app: goff
    spec:
      containers:
        - name: goff
          image: <IMAGE>
          resources:
            requests:
              memory: "512Mi"
              cpu: "1"
            limits:
              memory: "1Gi"
              cpu: "2"
          env:
            - name: DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: goff
                  key: database_url
            - name: DISCORDGO_TOKEN
              valueFrom:
                secretKeyRef:
                  name: goff
                  key: discord_token
            - name: GOFF_EMAIL_USERNAME
              valueFrom:
                secretKeyRef:
                  name: goff
                  key: email_username
            - name: GOFF_EMAIL_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: goff
                  key: email_password
      imagePullSecrets:
        - name: registry-1
