Make it possible to specify the key names in the Kubernetes Secret containing S3 access and secret access keys when configuring backups
Currently, the expected data key names in the Secrets referenced in the MongoDBOpsManager CR snippet below are hard-coded into the operator as "accessKey" and "secretKey".
apiVersion: mongodb.com/v1
kind: MongoDBOpsManager
...
spec:
backup:
s3OpLogStores:
- s3SecretRef:
name: mdb-bkp-aws-s3-creds
s3Stores:
- s3SecretRef:
name: mdb-bkp-aws-s3-creds
If the Secret's data key names were configurable, it would make life much easier for folks using the OpenShift Cloud Credentials Operator to generate S3 credentials. Maybe the CR could change to look something like this:
apiVersion: mongodb.com/v1
kind: MongoDBOpsManager
...
spec:
backup:
s3OpLogStores:
- s3SecretRef:
name: mdb-bkp-aws-s3-creds
accessKeyDataKeyName: aws_access_key_id
s3Stores:
- s3SecretRef:
name: mdb-bkp-aws-s3-creds
secretKeyDataKeyName: aws_secret_access_key
1
vote
