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

Refactoring specs for partial backup #2650

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drivers/scheduler/k8s/specs/postgres-azure-disk/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: postgres-data
labels:
backupVolumeType: csi
spec:
storageClassName: postgres-sc
accessModes:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-portworx-pvc
labels:
backupVolumeType : pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-csi-pvc
labels:
backupVolumeType : csi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: managed-csi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-csi-pvc-seq
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: managed-csi
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ spec:
claimName: mysql-portworx-pvc
- name: mysql-persistent-storage-aggr
persistentVolumeClaim:
claimName: mysql-cephfs-pvc
claimName: mysql-csi-pvc
- name: mysql-persistent-storage-seq
persistentVolumeClaim:
claimName: mysql-cephfs-pvc-seq
claimName: mysql-csi-pvc-seq
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -122,45 +122,3 @@ spec:
value: password
- name: MYSQL_SERVICE_PORT
value: "3306"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-portworx-pvc
labels:
backupVolumeType : pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-cephfs-pvc
labels:
backupVolumeType : csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-cephfs-pvc-seq
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-portworx-pvc
labels:
backupVolumeType : pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-csi-pvc
labels:
backupVolumeType : csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-csi-pvc-seq
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-portworx-pvc
labels:
backupVolumeType: pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-csi-pvc
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: managed-csi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-portworx-pvc
labels:
backupVolumeType: pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-csi-pvc
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: managed-csi
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-portworx-pvc
labels:
backupVolumeType: pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-csi-pvc
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-portworx-pvc
labels:
backupVolumeType: pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-csi-pvc
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ spec:
volumeMounts:
- name: mysql-portworx
mountPath: /var/lib/mysql
- name: mysql-cephfs
- name: mysql-csi
mountPath: /etc/mysql/conf.d
volumes:
- name: mysql-portworx
persistentVolumeClaim:
claimName: mysql-portworx-pvc
- name: mysql-cephfs
- name: mysql-csi
persistentVolumeClaim:
claimName: mysql-cephfs-pvc
claimName: mysql-csi-pvc
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -60,68 +60,12 @@ spec:
volumeMounts:
- name: postgres-portworx
mountPath: /var/lib/postgresql/data
- name: postgres-cephfs
- name: postgres-csi
mountPath: /etc/postgresql/conf.d
volumes:
- name: postgres-portworx
persistentVolumeClaim:
claimName: postgres-portworx-pvc
- name: postgres-cephfs
- name: postgres-csi
persistentVolumeClaim:
claimName: postgres-cephfs-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-portworx-pvc
labels:
backupVolumeType: pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-cephfs-pvc
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-portworx-pvc
labels:
backupVolumeType: pxd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-cephfs-pvc
labels:
backupVolumeType: csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: ocs-storagecluster-cephfs
claimName: postgres-csi-pvc
8 changes: 5 additions & 3 deletions tests/backup/backup_partial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ var _ = Describe("{BackupCSIVolumesWithPartialSuccess}", Label(TestCaseLabelsMap
JustBeforeEach(func() {
StartPxBackupTorpedoTest("BackupCSIVolumesWithPartialSuccess", "Verifies partial backup and restore when CSI volume backup are failed", nil, 299231, Ak, Q2FY25)
providers = GetBackupProviders()
numOfNamespace := 5
numOfNamespace := 2
log.InfoD("scheduling applications")
scheduledAppContexts = make([]*scheduler.Context, 0)
appList := Inst().AppList
defer func() {
Inst().AppList = appList
}()
Inst().AppList, _ = GetApplicationSpecForFeature("PartialBackup")
var err error
Inst().AppList, err = GetApplicationSpecForFeature("PartialBackup")
log.FailOnError(err, "Fetching application spec for feature PartialBackup")
for i := 0; i < numOfNamespace; i++ {
taskName := fmt.Sprintf("%s-%d", TaskNamePrefix, i)
appContexts := ScheduleApplications(taskName)
Expand Down Expand Up @@ -1253,7 +1255,7 @@ var _ = Describe("{PartialBackupSuccessWithAzureEndpoint}", Label(TestCaseLabels
Inst().AppList = appList
}()
var err error
Inst().AppList = []string{"pxb-singleapp-multivol"}
Inst().AppList = []string{"pxb-mysql-multiprov"}
for i := 0; i < numOfNamespace; i++ {
taskName := fmt.Sprintf("%s-%d", TaskNamePrefix, i)
appContexts := ScheduleApplications(taskName)
Expand Down
Loading