-
Notifications
You must be signed in to change notification settings - Fork 6
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
Openldap config: fix #40 #47
Conversation
Thank you for the PR, one remark is that I much prefer to do like it's already possible for database credentials. Create a Kubernetes Secret anyway if the user doesn't pass one: https://github.com/georchestra/helm-georchestra/blob/main/templates/database/database-geodata-secret.yaml Instead of having the ability to pass a Kubernetes Secret, but still allow the ability to pass the password through an environment variable. By the way, this time the CI is throwing a real error 😄: https://github.com/georchestra/helm-georchestra/actions/runs/6000210528/job/16271828142?pr=47#step:7:34 |
Okay, I can update it accordingly. Are you fine with using the
syntax anyway ? |
Is this better ? |
values.yaml
Outdated
@@ -194,6 +194,14 @@ ldap: | |||
adminDn: "cn=admin,dc=georchestra,dc=org" | |||
rolesRdn: "ou=roles" | |||
orgsRdn: "ou=orgs" | |||
# You can override in this secret some sensitive env. vars, like the ldap admin password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note that it can NOT be changed just by changing the value of the secret !!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you're right. I'm reformulating.
Good for me but I think one day we should document the structure of each secret :). |
templates/_helpers.tpl
Outdated
@@ -111,6 +111,10 @@ Insert LDAP environment variables | |||
*/}} | |||
{{- define "georchestra.ldap-envs" -}} | |||
{{- $ldap := .Values.ldap -}} | |||
{{- $ldap_secret_georchestra_name := printf "%s-ldap-passwords-secret" (include "georchestra.fullname" .) -}} | |||
{{- if $ldap.existingSecret }} | |||
{{- $ldap_secret_georchestra_name = $ldap.existingSecret -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't this be refactored with a "default" function from helm?
similar to
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite possibly. I must admit I merely copied the logic from https://github.com/georchestra/helm-georchestra/blob/main/templates/_helpers.tpl#L71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, it should be better now
You mean you'd rather have it more explictly loading just the one environment variable ? It's fine by me too |
No, I mean there are a lot of other cases where we allow an external secret but it's undocumented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good for me, waiting on the CI to pass
CI failure doesn't seem related to this PR, right @edevosc2c ? |
mmh that seems like a CI breaking again, that's odd I did my best to get it working properly. I have re-run it in case it would pass again during the night. I'll check again tomorrow. |
Example of valid secret could be
where the value is the actual password base64 encoded (
echo -n 'mysecretldapadminpassword' | base64
)