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

secret env vars #141

Merged
merged 2 commits into from
Jan 27, 2025
Merged

secret env vars #141

merged 2 commits into from
Jan 27, 2025

Conversation

aogier
Copy link
Contributor

@aogier aogier commented Jan 26, 2025

This PR allows for specifying secret env vars by either

  • mounting an entire secret(s) via envFrom

    deployment:
      secretEnvironments:
        - secret1
        - secret2
  • projecting specific secrets allowing eg. valueFrom in container's env stanza. An existing env value is preserved as is, but it is also allowed to be a map, ie. an invalid scalar value but a valid projection config:

    deployment:
      env:
        ACCOUNT_PROVISIONER: LDAP
        LDAP_SERVER_HOST: ldap://openldap
        LDAP_BIND_DN: cn=admin,dc=ldap
        LDAP_BIND_PW:
          valueFrom:
            secretKeyRef:
              name: mailserver
              key: LDAP_BIND_PW

everything is backwards compatible, so completely inobtrusive for existing deployments

hope this helps, ciao!

@aogier aogier requested a review from funkypenguin as a code owner January 26, 2025 11:28
@cfis
Copy link
Collaborator

cfis commented Jan 27, 2025

Can you bump the chart version so linting passes? Thanks

@aogier aogier force-pushed the feature/secret-env branch from b3cec18 to dc45b8c Compare January 27, 2025 07:35
@aogier
Copy link
Contributor Author

aogier commented Jan 27, 2025

done!

@cfis cfis merged commit f50ceda into docker-mailserver:master Jan 27, 2025
5 checks passed
@cfis
Copy link
Collaborator

cfis commented Jan 27, 2025

Thanks!

@aogier aogier deleted the feature/secret-env branch January 27, 2025 22:06
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

Successfully merging this pull request may close these issues.

2 participants