From e8af715b4394a2b922ab52ea2c1219ad452b7a24 Mon Sep 17 00:00:00 2001 From: Emil Natan Date: Thu, 16 Apr 2026 15:47:47 +0300 Subject: [PATCH] Enable Server-Side Apply for finalizers management Leverages functionality added here: https://github.com/knative/pkg/pull/3275 Options documented here: https://github.com/knative/pkg/blob/main/controller/options.go#L31-L40 --- pkg/reconciler/pipelinerun/controller.go | 8 +++++--- pkg/reconciler/taskrun/controller.go | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkg/reconciler/pipelinerun/controller.go b/pkg/reconciler/pipelinerun/controller.go index f081d6c87d..eb79ebbe45 100644 --- a/pkg/reconciler/pipelinerun/controller.go +++ b/pkg/reconciler/pipelinerun/controller.go @@ -88,9 +88,11 @@ func NewNamespacesScopedController(namespaces []string) func(ctx context.Context return controller.Options{ // The chains reconciler shouldn't mutate the pipelinerun's status. - SkipStatusUpdates: true, - ConfigStore: cfgStore, - FinalizerName: "chains.tekton.dev/pipelinerun", // TODO: unique name required? + SkipStatusUpdates: true, + ConfigStore: cfgStore, + FinalizerName: "chains.tekton.dev/pipelinerun", // TODO: unique name required? + UseServerSideApplyForFinalizers: true, + FinalizerFieldManager: "tekton-chains-controller/finalizers", } }) diff --git a/pkg/reconciler/taskrun/controller.go b/pkg/reconciler/taskrun/controller.go index 0783592a17..35783cee78 100644 --- a/pkg/reconciler/taskrun/controller.go +++ b/pkg/reconciler/taskrun/controller.go @@ -84,9 +84,11 @@ func NewNamespacesScopedController(namespaces []string) func(ctx context.Context return controller.Options{ // The chains reconciler shouldn't mutate the taskrun's status. - SkipStatusUpdates: true, - ConfigStore: cfgStore, - FinalizerName: "chains.tekton.dev/taskrun", + SkipStatusUpdates: true, + ConfigStore: cfgStore, + FinalizerName: "chains.tekton.dev/taskrun", + UseServerSideApplyForFinalizers: true, + FinalizerFieldManager: "tekton-chains-controller/finalizers", } })