-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add custom ENV values to pod deployment specs. #1161
Comments
Hi @Denney-tech, Thank you for opening this issue!
The operator defines the containers pulp-operator/controllers/deployment.go Line 227 in c08e0cd
but we don't provide a field in Pulp CR to add custom env vars.
That was a good idea! Just to document, in case others are having this same issue, another workaround (if building a new image is not possible/wanted) would be to put the operator in an unmanaged state and manually modify the deployments with the env vars. Here are some thoughts/ideas of implementation:
|
Is your feature request related to a problem? Please describe.
I have a need to provide environment variables to worker nodes for Python to behave the way I want it to.
E.g.
Describe the solution you'd like
I would like to have an
extra_env
or<pod_role>_extra_env
keys to add environment vars to deployments. While the ca-bundle for python is probably fine as a global extra environment var, there might be scenarios where you only want some environment variable applied to the web pods or content pods. So, havingweb_extra_env
orcontent_extra_env
etc might be ideal.Describe alternatives you've considered
As a workaround, since I'm already building the galaxy image myself for other reasons unrelated to the operator, so I'm going to add the environment variables I need directly to the image.
Additional context
I have been researching, but I can't find anything in the docs specifically for adding environment vars to deployments. The pulp_settings key will add extra pythonic dictionaries to the settings.py file, but unless I'm misunderstanding something, that file doesn't necessarily import the key/values as real environment vars.
Looking at the controllers/deployment.go#L922 file, the setcontainers function, as well as a couple others, do actually define the Env: of the container specs, but I'm not sure where it gets this from upstream or if it's always null because it isn't configurable in the pulp CRD?
If there should already be a way to add env vars to deployments, please provide guidance and documentation on this.
The text was updated successfully, but these errors were encountered: