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 provider mail param #12
Conversation
The commits should make this possible but I think it would not work in all cases. When you define an environment variable in a container in a template, then it is defined, and thus it always has a value. That's the case even if no value is provided to the environment variable at template level, in which case the environment variable is set with the empty string value. This means that when creating the USER_EMAIL environment variable at template level, which is the one used by the porta code, and assigning it the value of a ConfigMap entry named 'ADMIN_EMAIL' (the value of which is obtained from an OpenShift parameter with the same name), when the parameter is not provided then the environment variable is set to the empty string. The porta code that handles the definition of the USER_EMAIL value is in https://github.com/3scale/porta/blob/master/db/seeds.rb#L129. I verified this by applying the changes, deploying AMP, accessing the 'system-master' container and looking for the value of the 'USER_EMAIL' environment variable, and I can see it is defined but with the empty value when no email is provided at deployment time:
The options I see are:
|
We can make porta's code to check whether a value is present (as opposed to provided as an empty string or not provided at all). |
Make the provider admin mail configurable when a deploy is performed via a parameter named ADMIN_EMAIL, and the USER_EMAIL system envvar is set from that value.
da2fde6
to
3844673
Compare
3844673
to
eca080a
Compare
Code Climate has analyzed commit eca080a and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Make the provider admin mail configurable when a
deploy is performed via a parameter
named ADMIN_EMAIL, and the USER_EMAIL system envvar
is set from that value.