apiVersion: apps/v1
kind: Deployment
metadata:
  name: tuber
  annotations:
    "tuber/rolloutTimeout": 30m
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tuber
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app: tuber
    spec:
      serviceAccountName: tuber
      terminationGracePeriodSeconds: 1200
      containers:
        - image: "{{ .tuberImage }}"
          name: tuber
          command: [ "tuber", "start" ]
          resources:
            requests:
              memory: "1Gi"
              cpu: "1"
            limits:
              memory: "1Gi"
              cpu: "1"
          volumeMounts:
            - name: tuber-credentials
              readOnly: true
              mountPath: "/etc/tuber-credentials"
            - name: tuber-bolt
              mountPath: "/etc/tuber-bolt"
          envFrom:
            - secretRef:
                name: tuber-env
          ports:
            - containerPort: 3000
      volumes:
        - name: tuber-credentials
          secret:
            secretName: tuber-credentials.json
        - name: tuber-bolt
          persistentVolumeClaim:
            claimName: tuber
