apiVersion: apps/v1
kind: Deployment
metadata:
  name: devbot-deployment
spec:
  selector:
    # Only select pods based on the 'app' label
    matchLabels:
      app: devbot
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: devbot
    spec:
      containers:
      - name: devbot
        image: "quay.io/cdis/devbot:0.1"
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
        env:
        - name: SLACK_API_TOKEN
          valueFrom:
            secretKeyRef:
              name: devbot-g3auto
              key: "slacktoken.json"
        - name: SIGNING_SECRET
          valueFrom:
            secretKeyRef:
              name: devbot-g3auto
              key: "signingsecret.json"
        imagePullPolicy: Always
        resources:
          requests:
            cpu: 1
          limits:
            cpu: 2
            memory: 512Mi
