File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import (
2424type ClientPoolKey struct {
2525 HostPort string
2626 Namespace string
27- MutualTLSSecret string // Include secret name in key to invalidate cache when the secret name itself changes
27+ MutualTLSSecret string // Include secret name in key to invalidate cache when the secret name changes
2828}
2929
3030type ClientInfo struct {
Original file line number Diff line number Diff line change @@ -226,19 +226,19 @@ func (r *TemporalWorkerDeploymentReconciler) findTWDsUsingConnection(ctx context
226226 var requests []reconcile.Request
227227
228228 // Find all TWDs in same namespace that reference this TC
229- var workers temporaliov1alpha1.TemporalWorkerDeploymentList
230- if err := r .List (ctx , & workers , client .InNamespace (tc .GetNamespace ())); err != nil {
229+ var twds temporaliov1alpha1.TemporalWorkerDeploymentList
230+ if err := r .List (ctx , & twds , client .InNamespace (tc .GetNamespace ())); err != nil {
231231 return requests
232232 }
233233
234234 // Filter to ones using this connection
235- for _ , worker := range workers .Items {
236- if worker .Spec .WorkerOptions .TemporalConnection == tc .GetName () {
237- // Add the TWD object as a reconcile request
235+ for _ , twd := range twds .Items {
236+ if twd .Spec .WorkerOptions .TemporalConnection == tc .GetName () {
237+ // Enqueue a reconcile request for this TWD
238238 requests = append (requests , reconcile.Request {
239239 NamespacedName : types.NamespacedName {
240- Name : worker .Name ,
241- Namespace : worker .Namespace ,
240+ Name : twd .Name ,
241+ Namespace : twd .Namespace ,
242242 },
243243 })
244244 }
Original file line number Diff line number Diff line change @@ -88,7 +88,10 @@ func GeneratePlan(
8888 return plan , nil
8989}
9090
91- // checkAndUpdateDeploymentConnectionSpec checks if a deployment needs to be updated. This is true if the connection spec it's using is outdated.
91+ // checkAndUpdateDeploymentConnectionSpec determines whether the Deployment for the given versionID is
92+ // out-of-date with respect to the provided TemporalConnectionSpec. If an update is required, it mutates
93+ // the existing Deployment in-place and returns a pointer to that Deployment. If no update is needed or
94+ // the Deployment does not exist, it returns nil.
9295func checkAndUpdateDeploymentConnectionSpec (
9396 versionID string ,
9497 k8sState * k8s.DeploymentState ,
You can’t perform that action at this time.
0 commit comments