Skip to content

Commit

Permalink
Add support for rest backend (#713)
Browse files Browse the repository at this point in the history
- [x] Merge & revendor kmodules/objectstore-api#7
  • Loading branch information
Dipta Das authored and tamalsaha committed Apr 3, 2019
1 parent f7d9de0 commit 117e6f0
Show file tree
Hide file tree
Showing 40 changed files with 2,639 additions and 476 deletions.
4 changes: 4 additions & 0 deletions api/crds/v1alpha1/restic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,10 @@ spec:
type: string
required:
- volumePath
rest:
properties:
url:
type: string
s3:
properties:
bucket:
Expand Down
4 changes: 4 additions & 0 deletions api/crds/v1beta1/backupconfigurationtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,10 @@ spec:
type: string
required:
- volumePath
rest:
properties:
url:
type: string
s3:
properties:
bucket:
Expand Down
10 changes: 5 additions & 5 deletions api/crds/v1beta1/restoresession.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ spec:
hosts
items:
properties:
host:
description: Host specifies the name of the host whose backed
up state we are trying to restore By default, it will indicate
the workload itself
type: string
paths:
description: Paths specifies the paths to be restored for the
hosts under this rule. Don't specify if you have specified snapshots
Expand All @@ -356,6 +351,11 @@ spec:
items:
type: string
type: array
sourceHost:
description: SourceHost specifies the name of the host whose backed
up state we are trying to restore By default, it will indicate
the workload itself
type: string
subjects:
description: Subjects specifies the list of hosts that are subject
to this rule
Expand Down
1 change: 1 addition & 0 deletions apis/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const (
RepositoryBucket = "REPOSITORY_BUCKET"
RepositoryPrefix = "REPOSITORY_PREFIX"
RepositoryEndpoint = "REPOSITORY_ENDPOINT"
RepositoryURL = "REPOSITORY_URL"

Hostname = "HOSTNAME"

Expand Down
24 changes: 18 additions & 6 deletions apis/repositories/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions apis/stash/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions apis/stash/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions docs/examples/rest/backup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: stash.appscode.com/v1beta1
kind: BackupConfiguration
metadata:
name: pvc-backup-config
namespace: demo
spec:
runtimeSettings:
pod:
serviceAccountName: pvc-backup-restore
task:
name: pvc-backup-task
repository:
name: hello-repo
schedule: "* * * * *"
target:
ref:
apiVersion: v1
kind: PersistentVolumeClaim
name: test-pvc-source
volumeMounts:
- name: mount-01
mountPath: /etc/target
directories:
- /etc/target/dir-01
- /etc/target/dir-02
retentionPolicy:
keepLast: 5
prune: true
---
apiVersion: stash.appscode.com/v1beta1
kind: BackupSession
metadata:
name: pvc-backup-01
namespace: demo
spec:
backupConfiguration:
name: pvc-backup-config
20 changes: 20 additions & 0 deletions docs/examples/rest/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
kind: Pod
apiVersion: v1
metadata:
name: test-check-dest
namespace: demo
spec:
containers:
- name: busybox
image: busybox
command: ["/bin/sh","-c"]
args:
- 'set -x; ls /etc/target'
volumeMounts:
- mountPath: /etc/target
name: test-pvc-dest
restartPolicy: Never
volumes:
- name: test-pvc-dest
persistentVolumeClaim:
claimName: test-pvc-dest
Loading

0 comments on commit 117e6f0

Please sign in to comment.