fix: Add Helm hooks for schema Job to fix deployment ordering#888
Merged
robholland merged 3 commits intomainfrom Apr 14, 2026
Merged
fix: Add Helm hooks for schema Job to fix deployment ordering#888robholland merged 3 commits intomainfrom
robholland merged 3 commits intomainfrom
Conversation
robholland
approved these changes
Apr 14, 2026
| podDisruptionBudget: {} | ||
| schema: | ||
| # Use Helm hooks to ensure schema setup completes before server pods start. | ||
| # Set to false if using ArgoCD, Flux, Rancher or Terraform. |
Contributor
There was a problem hiding this comment.
nit: We should soften this if the hooks can also help in some ArgoCD cases, which the README suggests is the case. Maybe call out the specific for ArgoCD if it's succinct enough, or refer to the README if not.
Contributor
Author
There was a problem hiding this comment.
Removed ArgoCD from the comments.
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
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 was changed
Added Helm hooks (
pre-install,pre-upgrade) to the schema Job and shims ConfigMap to enforce deployment ordering. The schema Job now completes before server pods are created.Why?
When using Elasticsearch for visibility, a race condition exists between the schema Job and server Deployments. If a server pod writes to Elasticsearch before the schema Job creates the index with correct mappings, Elasticsearch auto-creates the index with wrong field types (e.g.,
WorkflowIdastextinstead ofkeyword). The schema Job then fails withmapper [WorkflowId] cannot be changed from type [text] to [keyword].Helm hooks eliminate this race by ensuring the schema Job runs and completes before any server Deployments are created.
Checklist
Closes [Bug] Error in temporal-schema pod creating mappings for Elasticsearch #882
How was this tested:
helm unittesthelm templateverified hook annotations presentUpdated
READMEwith a new section "Schema Setup and Deployment Ordering"