I’m deploying Temporal using the official Helm chart (v0.29.0) and want to ensure that my namespaces are always created or updated with the correct retention period (e.g., 182d), and that this is fully aligned with my deployment process.
Problem:
- The Helm chart has a
server.config.namespaces
(orserver.namespaces
) block, but changing this value does not actually create or update namespaces at deploy time. - If I manually run
tctl namespace register
ortctl namespace update
before or after deployment, a future redeploy reverts the retention to the default (e.g., 3d). - I need a solution where the deployment itself always sets the correct retention, and never risks reverting it or causing data loss.
What I’ve tried:
- Setting the desired retention in values.yaml under
server.config.namespaces
(orserver.namespaces
). - Forcing pod restarts and redeploys.
- Manually running
tctl
to update retention, but this is not safe as the deployment overwrites it later.
The Solution I’m Trying To Achieve:
- Namespace creation and retention must be managed by the deployment, not by a manual or out-of-band script.
- The solution must be idempotent and safe for redeploys (never reverts retention to a lower value).
- No risk of data loss due to retention being reset on redeploy.
My Question:
Is there a way to have the Temporal Helm chart always create/update namespaces with the correct retention, fully aligned with the values in my deployment?
If not, what is the best practice for automating namespace creation/updating as part of a Helm-based deployment, so that retention is never accidentally reverted?