apiVersion: v1
kind: ReplicationController
metadata:
  name: timemachine
spec:
  replicas: 1
  template:
    metadata:
      labels:
        k8s: scm-timemachine
    spec:
      hostNetwork: true
      nodeSelector:
        name: scm
      volumes:
        - name: timemachine
          rbd:
            monitors:
              - "172.18.0.1:6789"
              - "172.18.0.11:6789"
              - "172.18.0.12:6789"
            pool: rbd
            image: scm-timemachine
            user: admin
            keyring: /etc/ceph/ceph.client.admin.keyring
            secretRef:
              name: ceph-secret
            fsType: ext4
            readOnly: false
      containers:
        - name: timemachine
          image: vsdx/timemachine:v1.0
          env:
            - name: AFP_LOGIN
              value: "timemachine"
            - name: AFP_PASSWORD
              value: "timemachine"
            - name: AFP_NAME
              value: "TMBackup"
            - name: AFP_SIZE_LIMIT
              value: "1024000"
          volumeMounts:
            - name: timemachine
              mountPath: /timemachine

