apiVersion: apps/v1
kind: Deployment
metadata:
  name: remoteresources3-controller
  annotations:
    razee.io/git-repo: 'https://github.com/razee-io/RemoteResourceS3.git'
    razee.io/commit-sha: '5771fb3616cc1da29886561e382f15fd314c75d9'
  labels:
    razee/watch-resource: 'lite'
spec:
  replicas: 1
  selector:
    matchLabels:
      app: remoteresources3-controller
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: remoteresources3-controller
        razee/watch-resource: 'lite'
      name: remoteresources3-controller
    spec:
      serviceAccountName: razeedeploy-sa
      containers:
        - image: redhat-marketplace-authcheck:latest
          name: authcheck
          resources:
            requests:
              cpu: 10m
              memory: 20Mi
          terminationMessagePolicy: FallbackToLogsOnError
        - image: 'quay.io/razee/remoteresources3:0.5.2'
          resources:
            limits:
              memory: 200Mi
              cpu: 100m
            requests:
              memory: 75Mi
              cpu: 40m
          env:
            - name: CRD_WATCH_TIMEOUT_SECONDS
              valueFrom:
                configMapKeyRef:
                  name: razeedeploy-overrides
                  key: CRD_WATCH_TIMEOUT_SECONDS
                  optional: true
          imagePullPolicy: Always
          name: remoteresources3-controller
          livenessProbe:
            exec:
              command:
                - sh/liveness.sh
            initialDelaySeconds: 30
            periodSeconds: 150
            timeoutSeconds: 30
            failureThreshold: 1
          volumeMounts:
            - mountPath: /usr/src/app/download-cache
              name: cache-volume
            - mountPath: /usr/src/app/config
              name: razeedeploy-config
      volumes:
        - name: cache-volume
          emptyDir: {}
        - name: razeedeploy-config
          configMap:
            name: razeedeploy-config
            defaultMode: 420
            optional: true
