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

Added initContainers #125

Merged
merged 4 commits into from
Jul 14, 2024
Merged

Conversation

johnstarxx
Copy link

Added initContainers (with extraVolumes and extraVolumeMounts fields). Also closes: #114.

These fields are need if for example one uses custom CA authority (Step Certificates) and needs to set a custom certificate that needs to be stored in /etc/ssl/certs/. Using an init container, one can mount the certificates to the given folder and run the update-ca-certificates command.

@johnstarxx johnstarxx requested a review from funkypenguin as a code owner June 29, 2024 14:07
@cfis
Copy link
Collaborator

cfis commented Jul 2, 2024

For extra volumes, could we just use the already existing persistence key?

@johnstarxx
Copy link
Author

Using extraVolumes is more flexible because it allows mounting any type of volume (e.g., emptyDir, downwardAPI, projected). In my use case, the custom CA certificates are generated at runtime by an initContainer and only need to be available for the lifecycle of the pod, so persistence is not required. This simplifies configuration and ensures up-to-date certificates.

@cfis
Copy link
Collaborator

cfis commented Jul 9, 2024

Ok, does this PR work?

#117

So then this one would just be for initcontainers (which matches the subject name).

@johnstarxx
Copy link
Author

Yes, I think it might work. The difference between the two is that in PR #117 the extraVolume(s/Mounts) are in the .Values, whereas in this PR they are in the .Values.deployment like in other charts (e.g. argo or cert-manager). There are also charts that use them directly from .Values (prometheus-adapter) it they know that there will be only one deployment).

@cfis
Copy link
Collaborator

cfis commented Jul 11, 2024

I see. Thanks!

@cfis cfis merged commit 2b11e8b into docker-mailserver:master Jul 14, 2024
4 checks passed
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.

Could not mount multiple keys from same ConfigMap or Secret
2 participants