apiVersion: apps/v1
kind: Deployment
metadata:
  name: volsync
  labels:
    control-plane: volsync-controller
    helm.sh/chart: volsync-0.15.0
    app.kubernetes.io/name: volsync
    app.kubernetes.io/instance: volsync
    app.kubernetes.io/version: "0.15.0"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 2
  selector:
    matchLabels:
      control-plane: volsync-controller
      app.kubernetes.io/name: volsync
      app.kubernetes.io/instance: volsync
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/default-container: manager
      labels:
        control-plane: volsync-controller
        app.kubernetes.io/name: volsync
        app.kubernetes.io/instance: volsync
    spec:
      serviceAccountName: volsync
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
        runAsGroup: 65534
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: manager
          args:
            - --health-probe-bind-address=:8081
            - --metrics-bind-address=:8443
            - --leader-elect
            - --rclone-container-image=quay.io/backube/volsync:0.15.0
            - --restic-container-image=quay.io/backube/volsync:0.15.0
            - --rsync-container-image=quay.io/backube/volsync:0.15.0
            - --rsync-tls-container-image=quay.io/backube/volsync:0.15.0
            - --syncthing-container-image=quay.io/backube/volsync:0.15.0
            - --scc-name=volsync-privileged-mover
            - --metrics-require-rbac=false
          command:
            - /manager
          image: "quay.io/backube/volsync:0.15.0@sha256:4fedd41b3101dde090542009c4177f703d241bf4760d1767bd9df08fd8fd93a4"
          imagePullPolicy: IfNotPresent
          env:
            - name: VOLSYNC_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            limits: {}
            requests:
              cpu: 1m
              memory: 80Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: true
          volumeMounts:
            - name: tempdir
              mountPath: /tmp
      terminationGracePeriodSeconds: 10
      volumes:
        - name: tempdir
          emptyDir:
            medium: "Memory"
