Hi,
I was asked to create a second MongoDB instance on a production cluster which had a working backup config, installed using v1.13 of the Percona operator. After successful testing on a small 4 node cluster, using v1.15 for both copies of the database, a second production instance, in a standard 3/3/3 config, was created, using SSD storage, into a separate namespace, using the updated operator.
Steps to Reproduce:
After adding the correct secret file to the new namespace, an existing backup config was modified slightly, the main change being the addition of a value for prefix, to allow greater control of the backup location within S3
Version:
Operator version 1.15
Logs:
root@kube-1:~# cat s3-ms-mdb-backup-prod.yaml
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDB
metadata:
finalizers:
- delete-backup
name: mongodb-clu1
namespace: mongodb
storages:
s3-eu-west:
s3:
bucket: oabackups.viewranger.com
credentialsSecret: outdooractive-backup-s3-base64
insecureSkipTLSVerify: false
maxUploadParts: 10000
prefix: “second-mongo”
region: eu-west-2
storageClass: STANDARD
uploadPartSize: 10485760
type: s3
tasks:- compressionType: gzip
enabled: true
keep: 30
name: daily-s3-eu-west
schedule: 30 2 * * *
storageName: s3-eu-west
- compressionType: gzip
The only change was to add the prefix section, and to change the name. Removing the prefix section didn’t help.
When run in this form, the following error occurs.
root@kube-1:~# kubectl -n mongodb apply -f s3-ms-mdb-backup-prod.yaml
Error from server (BadRequest): error when creating “s3-ms-mdb-backup-prod.yaml”: PerconaServerMongoDB in version “v1” cannot be handled as a PerconaServerMongoDB: strict decoding error: unknown field “metadata.storages”
I believe I’ve seen some reference to an update to the apiVersion in the release notes, so have tried altering that to v1beta1 - error message below
root@kube-1:~# kubectl -n mongodb apply -f s3-ms-mdb-backup-prod.yaml
error: resource mapping not found for name: “mongodb-clu1” namespace: “mongodb” from “s3-ms-mdb-backup-prod.yaml”: no matches for kind “PerconaServerMongoDB” in version “psmdb.percona.com/v1beta1”
ensure CRDs are installed first
I’m sure I’ve missed something simple, would be most grateful if someone could point me in the right direction.
Also, is it possible/correct practise to run different versions of an operator in separate namespaces ?
Many thanks,
Mike