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

pod_environment_secret is not passed along to backup cronjob #1348

Closed
CaptainChemnitz4711 opened this issue Feb 4, 2021 · 4 comments
Closed

Comments

@CaptainChemnitz4711
Copy link

Hi,

we are currently using the backup functionality of the operator, which creates a cronjob within kubernetes that regularly executes logical backups as described here
For this we can pass along logical_backup_s3_secret_access_key in order to provide access to the storage. However this is currently passed in a configmap which is insecure. We therefore tried to use the pod_environment_secret mechanism in order to mount a custom secret which holds the credentials necessary upload the backup to storage.

It turned out that the secrets configured with pod_environment_secret are only considered / mounted on the operator itself. They are not present on the cronjob created by the operator to do the backups. Which leaves the whole backup mechanism insecure in terms of credential management.

I would suggest to either consider the pod_environment_secret also for creating the cronjob or to introduce a new variable specifically used for the logical backup.

  • Which image of the operator are you using?
    ---> registry.opensource.zalan.do/acid/postgres-operator:v1.6.0
  • Type of issue? [Bug report, question, feature request, etc.]
    --> BugReport / feature request
@laukaichung
Copy link

laukaichung commented Apr 27, 2021

Same. I was wondering if it is possible to pass pod_environment_configmap to logical backup cron jobs so that I don't have to hardcode the S3 credentials to the configLogicalBackup section. Is it supported?

@robertlandrum
Copy link

I've created a PR to address this issue. #2097

@yajo
Copy link
Contributor

yajo commented Feb 22, 2023

Possibly related (or duplicate): #2050

@FxKu
Copy link
Member

FxKu commented Jan 4, 2024

Closing as #2051 got merged

@FxKu FxKu closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants