apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: robbot
  name: robbot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: robbot
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: robbot
    spec:
      containers:
        - env:
            - name: DISCORD_API_TOKEN
              valueFrom:
                secretKeyRef:
                  name: robbot-discord-config
                  key: DISCORD_API_TOKEN
          image: us.gcr.io/robbot-discord/robbot:latest
          imagePullPolicy: IfNotPresent
          name: robbot
          resources:
            limits:
              cpu: "2"
              memory: "1Gi"       
      restartPolicy: Always
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
