Restoration fails if the new cluster is on a different namespace that the backup storage
Summary
When restoring a backup from a different namespace, even if the autoCopySecrets is created it cannot complete the backup
Environment
- StackGres version: 0.8 alpha4
- Kubernetes version (use
kubectl version
): 1.12.10 - 1.17.2 - Cloud provider or hardware configuration: kind amd64
Steps to reproduce
- Create namespace test1
- Install MinIO with default settings and one bucket on namespace test1
- Setup a backup configuration with the following options:
apiVersion: stackgres.io/v1alpha1
kind: StackGresBackupConfig
metadata:
name: backupconf
namespace: test1
spec:
fullSchedule: "0 5 * * *"
storage:
type: s3
s3:
prefix: s3://stackgres
endpoint: http://stackgres-cluster-minio:9000
forcePathStyle: true
region: k8s
credentials:
accessKey:
name: stackgres-cluster-minio
key: accesskey
secretKey:
name: stackgres-cluster-minio
key: secretkey
- Create a stackgres cluster with the following settings
apiVersion: stackgres.io/v1alpha1
kind: StackGresCluster
metadata:
name: pgbench-cluster
namespace: test1
spec:
instances: 2
pgVersion: '12.1'
backupConfig: 'backupconf'
volumeSize: '10Gi'
- Trigger a manual backup with the following yaml:
apiVersion: stackgres.io/v1alpha1
kind: StackGresBackup
metadata:
namespace: test1
name: pgbench-cluster-manual
spec:
cluster: pgbench-cluster
isPermanent: true
-
Create namespace test2
-
Restore a stackgres cluster from the executed backup in test1
apiVersion: stackgres.io/v1alpha1
kind: StackGresCluster
metadata:
name: pgbench-restore
namespace: test2
spec:
instances: 2
pgVersion: '12.1'
volumeSize: '10Gi'
restore:
downloadDiskConcurrency: 10
autoCopySecrets: true
fromBackup: <The backup uid>
Relevant logs and/or screenshots
Neither patroni nor walg thorws an error, but the cluster never becomes ready
Edited by Xavier Sierra