apiVersion: v1 kind: ServiceAccount metadata: name: deployment-demo --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: deployment-demo roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: stash-sidecar subjects: - kind: ServiceAccount name: deployment-demo namespace: default --- apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: labels: app: replicaset-demo name: workload namespace: default spec: replicas: 1 template: metadata: labels: app: replicaset-demo name: busybox spec: serviceAccountName: replicaset-demo containers: - command: - sleep - "3600" image: busybox imagePullPolicy: IfNotPresent name: busybox volumeMounts: - mountPath: /source/data name: source-data restartPolicy: Always volumes: - gitRepo: repository: https://github.com/appscode/stash-data.git name: source-data --- apiVersion: v1 data: RESTIC_PASSWORD: bm90QHNlY3JldA== kind: Secret metadata: name: replicaset-secret namespace: default type: Opaque --- apiVersion: stash.appscode.com/v1alpha1 kind: Restic metadata: name: replicaset-restic namespace: default spec: selector: matchLabels: app: replicaset-demo fileGroups: - path: /source/data retentionPolicyName: 'keep-last-5' backend: local: mountPath: /repo hostPath: path: /data/stash-test/restic-repo storageSecretName: replicaset-secret schedule: '@every 1m' volumeMounts: - mountPath: /source/data name: source-data retentionPolicies: - name: 'keep-last-5' keepLast: 5 prune: true