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

allow populating pod environment from Secrets #480

Closed
kupson opened this issue Feb 4, 2019 · 7 comments
Closed

allow populating pod environment from Secrets #480

kupson opened this issue Feb 4, 2019 · 7 comments
Labels

Comments

@kupson
Copy link
Contributor

kupson commented Feb 4, 2019

It would be nice to populate env variables from secrets e.g. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY so they won't be exposed in ConfigMaps.

@Jan-M
Copy link
Member

Jan-M commented Feb 4, 2019

Is there a reason you cannot use iam/pod iam role for this?

@kupson
Copy link
Contributor Author

kupson commented Feb 6, 2019

Is there a reason you cannot use iam/pod iam role for this?

That would be kube_iam_role option?
I would like to use minio instead of Amazon S3 and I'm not sure that kube2iam could handle it.

@erthalion
Copy link
Contributor

Are there any other alternatives, maybe just mount these credentials and let the client library to discover it? If I'm not mistaken, this mentioned in the minio documentation

@kupson
Copy link
Contributor Author

kupson commented Apr 4, 2019

It's the wal-g that needs those environment variables. It would need the volume with credentials mounted so the file ~postgres/.aws/credentials will be available.

But all the Pods created by postgres-operator would need the volume and I see no way to create it in the postgres-operator configuration or the postgresql object right now.

Is there a way to add custom volume to all spilo containers and I'm missing it?

@erthalion
Copy link
Contributor

Not yet, but probably we can leverage #535 for that purpose?

@kupson
Copy link
Contributor Author

kupson commented Apr 5, 2019

I find #535 suboptimal as I still would need to run some script to turn secrets from Minio format (name: value) into .aws/credentials:

[default]
aws_access_key_id=EXAMPLE
aws_secret_access_key=EXAMPLEKEY

or maybe keep two secrets in sync with same values but different format.
I see environment variables as more flexible solution.

@FxKu
Copy link
Member

FxKu commented Jul 30, 2020

Closing this issue as now supported with #946 being merged.

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

Successfully merging a pull request may close this issue.

4 participants