Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/controller/deprecated_tc_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/handler"
)

// +kubebuilder:rbac:groups=temporal.io,resources=temporalconnections,verbs=get;list;watch;update;patch
Expand Down Expand Up @@ -110,6 +111,11 @@ func (r *DeprecatedTCReconciler) Reconcile(ctx context.Context, req ctrl.Request
func (r *DeprecatedTCReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&temporaliov1alpha1.TemporalConnection{}).
// A Connection is the replacement for the same-named TemporalConnection,
// so creating one changes the deprecated resource's status. Without this
// watch that status stays stale until an unrelated event happens to
// trigger a reconcile.
Watches(&temporaliov1alpha1.Connection{}, &handler.EnqueueRequestForObject{}).
Named("deprecated-tc").
Complete(r)
}
Loading