Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8SPSMDB-1109: Add filesystem storage support for backups/restores #1682

Merged
merged 11 commits into from
Nov 11, 2024
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ $(DEPLOYDIR)/cw-bundle.yaml: $(DEPLOYDIR)/crd.yaml $(DEPLOYDIR)/cw-rbac.yaml $(D

manifests: $(DEPLOYDIR)/crd.yaml $(DEPLOYDIR)/bundle.yaml $(DEPLOYDIR)/cw-bundle.yaml ## Put generated manifests to deploy directory

e2e-test:
IMAGE=$(IMAGE) ./e2e-tests/$(TEST)/run

##@ Build

.PHONY: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down
29 changes: 29 additions & 0 deletions config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ spec:
required:
- credentialsSecret
type: object
filesystem:
properties:
path:
type: string
required:
- path
type: object
s3:
properties:
bucket:
Expand Down Expand Up @@ -388,6 +395,28 @@ spec:
- name
type: object
type: array
volumeMounts:
items:
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
required:
- mountPath
- name
type: object
type: array
required:
- enabled
- image
Expand Down
43 changes: 43 additions & 0 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down Expand Up @@ -241,6 +248,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down Expand Up @@ -990,6 +1004,13 @@ spec:
required:
- credentialsSecret
type: object
filesystem:
properties:
path:
type: string
required:
- path
type: object
s3:
properties:
bucket:
Expand Down Expand Up @@ -1070,6 +1091,28 @@ spec:
- name
type: object
type: array
volumeMounts:
items:
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
required:
- mountPath
- name
type: object
type: array
required:
- enabled
- image
Expand Down
11 changes: 11 additions & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ spec:
# - name: sidecar-config
# configMap:
# name: myconfigmap
# - name: backup-nfs
# nfs:
# server: "nfs-service.storage.svc.cluster.local"
# path: "/psmdb-some-name-rs0"
# sidecarPVCs:
# - apiVersion: v1
# kind: PersistentVolumeClaim
Expand Down Expand Up @@ -660,6 +664,13 @@ spec:
# prefix: PREFIX-NAME
# endpointUrl: https://accountName.blob.core.windows.net
# credentialsSecret: SECRET-NAME
# backup-nfs:
# type: filesystem
# filesystem:
# path: /mnt/nfs/
# volumeMounts:
# - mountPath: /mnt/nfs/
# name: backup-nfs
pitr:
enabled: false
oplogOnly: false
Expand Down
43 changes: 43 additions & 0 deletions deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down Expand Up @@ -241,6 +248,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down Expand Up @@ -990,6 +1004,13 @@ spec:
required:
- credentialsSecret
type: object
filesystem:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update cr.yaml as well and please create helm PR :)

properties:
path:
type: string
required:
- path
type: object
s3:
properties:
bucket:
Expand Down Expand Up @@ -1070,6 +1091,28 @@ spec:
- name
type: object
type: array
volumeMounts:
items:
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
required:
- mountPath
- name
type: object
type: array
required:
- enabled
- image
Expand Down
43 changes: 43 additions & 0 deletions deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down Expand Up @@ -241,6 +248,13 @@ spec:
type: string
error:
type: string
filesystem:
properties:
path:
type: string
required:
- path
type: object
lastTransition:
format: date-time
type: string
Expand Down Expand Up @@ -990,6 +1004,13 @@ spec:
required:
- credentialsSecret
type: object
filesystem:
properties:
path:
type: string
required:
- path
type: object
s3:
properties:
bucket:
Expand Down Expand Up @@ -1070,6 +1091,28 @@ spec:
- name
type: object
type: array
volumeMounts:
items:
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
required:
- mountPath
- name
type: object
type: array
required:
- enabled
- image
Expand Down
4 changes: 4 additions & 0 deletions e2e-tests/demand-backup-fs/compare/find-2nd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
{ "_id" : , "x" : 100501 }
bye
4 changes: 4 additions & 0 deletions e2e-tests/demand-backup-fs/compare/find-3rd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
{ "_id" : , "x" : 100502 }
bye
5 changes: 5 additions & 0 deletions e2e-tests/demand-backup-fs/compare/find-4th.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
{ "_id" : , "x" : 100502 }
{ "_id" : , "x" : 100501 }
bye
5 changes: 5 additions & 0 deletions e2e-tests/demand-backup-fs/compare/find-5th.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
{ "_id" : , "x" : 100502 }
{ "_id" : , "x" : 100503 }
bye
3 changes: 3 additions & 0 deletions e2e-tests/demand-backup-fs/compare/find.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
bye
Loading
Loading