-
Notifications
You must be signed in to change notification settings - Fork 6
Kubernetes: properly reuse tls certificates ⚠️ #1234
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
Merged
YuryHrytsuk
merged 8 commits into
ITISFoundation:main
from
YuryHrytsuk:kubernetes-reuse-tls-certs
Oct 20, 2025
Merged
Kubernetes: properly reuse tls certificates ⚠️ #1234
YuryHrytsuk
merged 8 commits into
ITISFoundation:main
from
YuryHrytsuk:kubernetes-reuse-tls-certs
Oct 20, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traefik does not properly work when ingress'es in multiple namespaces use the same tls certificate. See more in traefik/traefik#12116. This works around the problem by manually defining certificates and uploading them to TLSStore. Ingress'es use TLSStore under the hood. Implementation detail: 1) we generate certificates by explicitly defining certificate resource in cert-manager 2) we copy generated secrets (containing certitificates) to traefik namespace via reflector 3) traefik explicitly defines TLSStore that references secrets (containing certificates) Bonus: - Add HELMFILE_EXTRA_ARGS variable to Makefile to pass options to helmfile CLI if necessary Related issue/s - closes ITISFoundation#1228 Related PR/s - configuration ...
413f10a to
6fc601d
Compare
2 tasks
mrnicegyu11
reviewed
Oct 20, 2025
mrnicegyu11
approved these changes
Oct 20, 2025
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.
looks solid, thanks for the verbose PR description. 🚀 🎸
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Generate certificate once and store them in global default traefik TLS Store
Implementation detail
in
cert-manager(this is configured via helm chart values)cert-managernamespace totraefiknamespacevia
reflector(this is achieved via secretTemplate annotations)traefikexplicitly definesTLS Storethat references secretscontaining certificates (tlsStore is configured in helm chart values)
Implications
traefikautomatically matches domain with registered in TLS Store certificatesBonus:
HELMFILE_EXTRA_ARGSvariable to Makefile to pass options to helmfile CLI if necessaryActions required
monitoringcertificate, secret, order and certificaterequests from all affected workloads (e.g.portainer)reflectornamespace (add pod security standard annotation)To do / answer
Related issue/s
Related PR/s
Checklist