Skip to content

feat: generate TLS certificates using cert-manager#820

Open
luiscosta18 wants to merge 5 commits intotemporalio:mainfrom
luiscosta18:certs
Open

feat: generate TLS certificates using cert-manager#820
luiscosta18 wants to merge 5 commits intotemporalio:mainfrom
luiscosta18:certs

Conversation

@luiscosta18
Copy link
Copy Markdown

@luiscosta18 luiscosta18 commented Dec 30, 2025

What was changed
Add certificates.yaml + secret.yaml to templates

Why?
generate certificates using cert-manager

How was this tested
Deployed cert-manager helm-chart
Deployed temporal helm chart, 0.57.0, using temporal/charts/temporal/tests/certificates.yaml as values.yaml, with my own tls.crt + tls.key
Cert-manager will:

Use the temporal-issuer (which refers to the CA).
Ask the CA (from the tls-certs secret) to sign a new certificate.
Create the temporal-tls-certs secret in the same namespace — this secret will contain:
tls.crt: the signed certificate
tls.key: the private key
Optionally, ca.crt: the CA certificate (if configured)
➜ ~ kubectl get secret -n temporal

NAME TYPE DATA AGE
temporal-tls-certs kubernetes.io/tls 3 3h38m
tls-certs Opaque 2 153m

➜ ~ kubectl get certificate -n temporal

NAME READY SECRET AGE
temporal-cert True temporal-tls-certs 5h35m

➜ ~ kubectl get certificaterequests -n temporal-data

NAME APPROVED DENIED READY ISSUER REQUESTER AGE
temporal-cert-1 True True temporal-issuer system:serviceaccount:cert-manager:test-cert-manager 5h

@luiscosta18 luiscosta18 requested a review from a team as a code owner December 30, 2025 21:13
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 30, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@luiscosta18 luiscosta18 changed the title feat: generate TLS certificates using cer t-manager feat: generate TLS certificates using cert-manager Dec 30, 2025
@luiscosta18
Copy link
Copy Markdown
Author

Hello @robholland @tomwheeler @PhillypHenning

Please review this PR. Thanks.

@robholland robholland self-assigned this Jan 16, 2026
@luiscosta18
Copy link
Copy Markdown
Author

luiscosta18 commented Mar 30, 2026

Hello @robholland @tomwheeler @PhillypHenning

Please review this PR. Thanks.

Hello @robholland @tomwheeler @PhillypHenning
Looking forward to have your feedback on this 🙂

@@ -0,0 +1,90 @@
server:
additionalVolumeMounts:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we automate these volumes/volumeMounts via helpers so that the user doesn't need to include them in their values? They are all boiler plate as the variable names and locations are all determined by Temporal itself. We can use a server.tls or similar values structure that mixes in the relevant volumes/mounts alongside any additional* the user has set. Likewise web.tls.

secret:
secretName: temporal-tls-certs
config:
tls:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can build config.tls automatically based on interpreting a more concise server.tls stanza also. Most of this is also boiler plate, just not sure about requireClientAuth and serverName for example. I defer to your knowledge of what should be customisable there.

className: ""
hosts:
- ""
additionalSecrets:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these basically placeholders that cert-manager updates?

tls.key: |
-----BEGIN EC PRIVATE KEY-----
-----END EC PRIVATE KEY-----
certificates:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, maybe we add the volumes/mounts based on this block? Not sure if need to have server. and web. variants though, would it be valid to want cert manager for one but not the other?

@@ -0,0 +1,13 @@
{{- if .Values.additionalSecrets }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add an additionalSecrets concept here, but rather have secrets specific to TLS. I think there is actually a specific kind of secret in k8s for certificates?

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.

3 participants