Fix: pin connection on deprecated versions - #525
Merged
Conversation
niyomukiza-mechack
requested review from
a team,
eniko-dif and
jlegrone
as code owners
August 12, 2026 22:53
jaypipes
approved these changes
Aug 13, 2026
jaypipes
left a comment
Collaborator
There was a problem hiding this comment.
👍 just fixes a typo from a previous PR. all good.
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
In
internal/planner/planner.gothere's agetUpdateDeploymentsfunction that gets called during the planning process and looks at the observed state and returns a list of of existing Deployments that need their pod/connection updated.Currently there's a loop that propagates connectionRef changes to draining and drained versions.
I deleted that loop so that only target and current versions now follow connectionRef changes. Deprecated versions(draining and drained) keep the connection baked into their Deployment at creation time.
During end to end testing I ran into a Kubernetes validation error(
volumeMounts[0].name: Not found: "/etc/temporal/tls")from my previous pr(#516 (comment)),ensureTLSVolumeMountwas settingNameinstead ofMountPathso I addressed that here.Why?
Context: #493
When switching
ConnectionRefswitching connectionRef on their WorkerDeployments. The controller re-pointed all versions(current,draining and drained) at the new connection. Draining versions had working credentials and were serving open pinned workflows so they should have been left untouched.Checklist
Closes
How was this tested:
Unit tests
Local end 2 end (Kind cluster + Temporal Cloud)
I reproduced the bug and verified the fix with a 3 version rainbow deployment (v1 DRAINING, v2 DRAINING, v3 CURRENT) connected to ns-nm-twc-01.temporal-dev namespace over mTLS.
Before the fix: I changed mutualTLSSecretRef from temporal-cloud-mtls to temporal-cloud-mtls-2. All three versions updated:

After the fix: I made the same connection change. Only v3 (current version) updated; v1 and v2 (draining) stayed pinned

Auth switch of mTLS to API key was not testable in local staging due to environment constraint. I got a
certificate signed by unknown authorityand similar errors I mentioned in #493