From 663c716f76c994c4b81abe4c23d2b0866ed02843 Mon Sep 17 00:00:00 2001 From: SK Ali Arman Date: Fri, 14 Feb 2025 17:22:56 +0600 Subject: [PATCH 1/2] Update Percona XtraDB Cluster Backup And Restore Signed-off-by: SK Ali Arman --- .../cluster/examples/backupconfiguration.yaml | 2 +- .../examples/restored-xtradb-cluster.yaml | 2 +- .../cluster/examples/restoresession.yaml | 7 ++++- .../examples/sample-xtradb-cluster.yaml | 2 +- docs/addons/percona-xtradb/cluster/index.md | 29 +++++++++++-------- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/docs/addons/percona-xtradb/cluster/examples/backupconfiguration.yaml b/docs/addons/percona-xtradb/cluster/examples/backupconfiguration.yaml index 4744b210..460a09c5 100644 --- a/docs/addons/percona-xtradb/cluster/examples/backupconfiguration.yaml +++ b/docs/addons/percona-xtradb/cluster/examples/backupconfiguration.yaml @@ -6,7 +6,7 @@ metadata: spec: schedule: "*/5 * * * *" task: - name: perconaxtradb-backup-5.7 + name: perconaxtradb-backup-8.0 repository: name: gcs-repo-xtradb-cluster target: diff --git a/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml b/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml index eb3dfc44..7e1d2330 100644 --- a/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml +++ b/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml @@ -4,7 +4,7 @@ metadata: name: restored-xtradb-cluster namespace: demo spec: - version: "5.7-cluster" + version: "8.0.31" replicas: 3 authSecret: name: sample-xtradb-cluster-auth diff --git a/docs/addons/percona-xtradb/cluster/examples/restoresession.yaml b/docs/addons/percona-xtradb/cluster/examples/restoresession.yaml index 7c70b252..d7f4853e 100644 --- a/docs/addons/percona-xtradb/cluster/examples/restoresession.yaml +++ b/docs/addons/percona-xtradb/cluster/examples/restoresession.yaml @@ -5,9 +5,14 @@ metadata: namespace: demo spec: task: - name: perconaxtradb-restore-5.7 + name: perconaxtradb-restore-8.0 repository: name: gcs-repo-xtradb-cluster + runtimeSettings: + container: + securityContext: + runAsGroup: 1001 + runAsUser: 1001 target: replicas: 3 ref: diff --git a/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml b/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml index 1c1af21c..7be73a45 100644 --- a/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml +++ b/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml @@ -4,7 +4,7 @@ metadata: name: sample-xtradb-cluster namespace: demo spec: - version: "5.7-cluster" + version: "8.0.31" replicas: 3 storageType: Durable storage: diff --git a/docs/addons/percona-xtradb/cluster/index.md b/docs/addons/percona-xtradb/cluster/index.md index 51e954db..054cebda 100644 --- a/docs/addons/percona-xtradb/cluster/index.md +++ b/docs/addons/percona-xtradb/cluster/index.md @@ -59,7 +59,7 @@ metadata: name: sample-xtradb-cluster namespace: demo spec: - version: "5.7-cluster" + version: "8.0.31" replicas: 3 storageType: Durable storage: @@ -86,7 +86,7 @@ Let's check if the database is ready to use, ```bash $ kubectl get px -n demo sample-xtradb-cluster NAME VERSION STATUS AGE -sample-xtradb-cluster 5.7-cluster Ready 7m46s +sample-xtradb-cluster 8.0.31 Ready 7m46s ``` The database is `Ready`. Verify that KubeDB has created a Secret and a Service for this database using the following commands, @@ -159,7 +159,7 @@ spec: secret: name: sample-xtradb-cluster-auth type: kubedb.com/perconaxtradb - version: "5.7-cluster" + version: "8.0.31" ``` Stash uses the AppBinding CRD to connect with the target database. It requires the following two fields to be set in the AppBinding's `.spec` section. @@ -342,7 +342,7 @@ metadata: spec: schedule: "*/5 * * * *" task: - name: perconaxtradb-backup-5.7 + name: perconaxtradb-backup-8.0 repository: name: gcs-repo-xtradb-cluster target: @@ -376,7 +376,7 @@ If everything goes well, the phase of the `BackupConfiguration` should be `Ready ```bash $ kubectl get backupconfiguration -n demo NAME TASK SCHEDULE PAUSED PHASE AGE -sample-xtradb-cluster-backup perconaxtradb-backup-5.7 */5 * * * * Ready 11s +sample-xtradb-cluster-backup perconaxtradb-backup-8.0 */5 * * * * Ready 11s ``` @@ -447,7 +447,7 @@ Now, wait for a moment. Stash will pause the BackupConfiguration. Verify that th ```console $ kubectl get backupconfiguration -n demo sample-xtradb-cluster-backup NAME TASK SCHEDULE PAUSED PHASE AGE -sample-xtradb-cluster-backup perconaxtradb-backup-5.7 */5 * * * * true Ready 50m +sample-xtradb-cluster-backup perconaxtradb-backup-8.0 */5 * * * * true Ready 50m ``` Notice the `PAUSED` column. Value `true` for this field means that the BackupConfiguration has been paused. @@ -468,7 +468,7 @@ metadata: name: restored-xtradb-cluster namespace: demo spec: - version: "5.7-cluster" + version: "8.0.31" replicas: 3 authSecret: name: sample-xtradb-cluster-auth @@ -497,7 +497,7 @@ If you check the database status, you will see it is stuck in **`Provisioning`** ```bash $ kubectl get px -n demo restored-xtradb-cluster NAME VERSION STATUS AGE -restored-xtradb-cluster 5.7-cluster Provisioning 4m10s +restored-xtradb-cluster 8.0.31 Provisioning 4m10s ``` #### Create RestoreSession @@ -516,9 +516,14 @@ metadata: namespace: demo spec: task: - name: perconaxtradb-restore-5.7 + name: perconaxtradb-restore-8.0 repository: name: gcs-repo-xtradb-cluster + runtimeSettings: + container: + securityContext: + runAsGroup: 1001 + runAsUser: 1001 target: replicas: 3 ref: @@ -584,9 +589,9 @@ At first, check if the database has gone into **`Running`** state, ```bash $ kubectl get px -n demo restored-xtradb-cluster --watch NAME VERSION STATUS AGE -restored-xtradb-cluster 5.7-cluster Provisioning 3m36s -restored-xtradb-cluster 5.7-cluster Provisioning 4m4s -restored-xtradb-cluster 5.7-cluster Ready 4m4s +restored-xtradb-cluster 8.0.31 Provisioning 3m36s +restored-xtradb-cluster 8.0.31 Provisioning 4m4s +restored-xtradb-cluster 8.0.31 Ready 4m4s ``` Now, find out the database Pod, From 55bd6240594c850b63ddc2871eb1648a6b7b1531 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 14 Feb 2025 14:29:49 -0800 Subject: [PATCH 2/2] use 8.0.40 Signed-off-by: Tamal Saha --- .../examples/restored-xtradb-cluster.yaml | 2 +- .../cluster/examples/sample-xtradb-cluster.yaml | 2 +- docs/addons/percona-xtradb/cluster/index.md | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml b/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml index 7e1d2330..844ac2ae 100644 --- a/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml +++ b/docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml @@ -4,7 +4,7 @@ metadata: name: restored-xtradb-cluster namespace: demo spec: - version: "8.0.31" + version: "8.0.40" replicas: 3 authSecret: name: sample-xtradb-cluster-auth diff --git a/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml b/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml index 7be73a45..da98ce48 100644 --- a/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml +++ b/docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml @@ -4,7 +4,7 @@ metadata: name: sample-xtradb-cluster namespace: demo spec: - version: "8.0.31" + version: "8.0.40" replicas: 3 storageType: Durable storage: diff --git a/docs/addons/percona-xtradb/cluster/index.md b/docs/addons/percona-xtradb/cluster/index.md index 054cebda..77589c50 100644 --- a/docs/addons/percona-xtradb/cluster/index.md +++ b/docs/addons/percona-xtradb/cluster/index.md @@ -59,7 +59,7 @@ metadata: name: sample-xtradb-cluster namespace: demo spec: - version: "8.0.31" + version: "8.0.40" replicas: 3 storageType: Durable storage: @@ -86,7 +86,7 @@ Let's check if the database is ready to use, ```bash $ kubectl get px -n demo sample-xtradb-cluster NAME VERSION STATUS AGE -sample-xtradb-cluster 8.0.31 Ready 7m46s +sample-xtradb-cluster 8.0.40 Ready 7m46s ``` The database is `Ready`. Verify that KubeDB has created a Secret and a Service for this database using the following commands, @@ -159,7 +159,7 @@ spec: secret: name: sample-xtradb-cluster-auth type: kubedb.com/perconaxtradb - version: "8.0.31" + version: "8.0.40" ``` Stash uses the AppBinding CRD to connect with the target database. It requires the following two fields to be set in the AppBinding's `.spec` section. @@ -468,7 +468,7 @@ metadata: name: restored-xtradb-cluster namespace: demo spec: - version: "8.0.31" + version: "8.0.40" replicas: 3 authSecret: name: sample-xtradb-cluster-auth @@ -497,7 +497,7 @@ If you check the database status, you will see it is stuck in **`Provisioning`** ```bash $ kubectl get px -n demo restored-xtradb-cluster NAME VERSION STATUS AGE -restored-xtradb-cluster 8.0.31 Provisioning 4m10s +restored-xtradb-cluster 8.0.40 Provisioning 4m10s ``` #### Create RestoreSession @@ -589,9 +589,9 @@ At first, check if the database has gone into **`Running`** state, ```bash $ kubectl get px -n demo restored-xtradb-cluster --watch NAME VERSION STATUS AGE -restored-xtradb-cluster 8.0.31 Provisioning 3m36s -restored-xtradb-cluster 8.0.31 Provisioning 4m4s -restored-xtradb-cluster 8.0.31 Ready 4m4s +restored-xtradb-cluster 8.0.40 Provisioning 3m36s +restored-xtradb-cluster 8.0.40 Provisioning 4m4s +restored-xtradb-cluster 8.0.40 Ready 4m4s ``` Now, find out the database Pod,