# This is a placeholder deployment config so operator-sdk add cluster-roles for velero to ClusterServiceVersion
# It will be removed by yq during make bundle
kind: Deployment
apiVersion: apps/v1
metadata:
  name: velero
  namespace: system
  labels:
    openshift.io/oadp: 'True'
spec:
  replicas: 0
  selector:
    matchLabels:
      component: velero
      deploy: velero
  template:
    metadata:
      labels:
        component: velero
        deploy: velero
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: '8085'
        prometheus.io/scrape: 'true'
    spec:
      restartPolicy: Always
      initContainers:
        - name: openshift-velero-plugin
          image: 'quay.io/konveyor/openshift-velero-plugin:latest'
          resources: {}
          volumeMounts:
            - name: plugins
              mountPath: /target
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
        - name: velero-plugin-for-aws
          image: 'quay.io/konveyor/velero-plugin-for-aws:latest'
          resources: {}
          volumeMounts:
            - name: plugins
              mountPath: /target
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
        - name: velero-plugin-for-csi
          image: 'quay.io/konveyor/velero-plugin-for-csi:latest'
          resources: {}
          volumeMounts:
            - name: plugins
              mountPath: /target
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
      serviceAccountName: velero
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
      securityContext: {}
      containers:
        - resources:
            limits:
              cpu: '1'
              memory: 512Mi
            requests:
              cpu: 500m
              memory: 128Mi
          terminationMessagePath: /dev/termination-log
          name: velero
          command:
            - /velero
          env:
            - name: VELERO_SCRATCH_DIR
              value: /scratch
            - name: VELERO_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: LD_LIBRARY_PATH
              value: /plugins
            - name: AWS_SHARED_CREDENTIALS_FILE
              value: /credentials/cloud
          ports:
            - name: metrics
              containerPort: 8085
              protocol: TCP
          imagePullPolicy: Always
          volumeMounts:
            - name: plugins
              mountPath: /plugins
            - name: scratch
              mountPath: /scratch
            - name: certs
              mountPath: /etc/ssl/certs
            - name: cloud-credentials
              mountPath: /credentials
          terminationMessagePolicy: File
          image: 'quay.io/konveyor/velero:latest'
          args:
            - server
      serviceAccount: velero
      volumes:
        - name: plugins
          emptyDir: {}
        - name: scratch
          emptyDir: {}
        - name: certs
          emptyDir: {}
        - name: cloud-credentials
          secret:
            secretName: cloud-credentials
            defaultMode: 420
      dnsPolicy: ClusterFirst
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600