From 3c77c775a7464cb8fd42e4addace86298d5d39df Mon Sep 17 00:00:00 2001 From: Shivam Mukhade Date: Fri, 24 Sep 2021 09:39:01 +0530 Subject: [PATCH] Removes deletion timestamp check in Autocreation of TektonConfig If TektonConfig has a deletion stamp, it won't be deleted unless the operator is up and running as the object has finalizer. waiting for it to get deleted will stop operator from running and object still won't be deleted. hence removing the condition for checking deletion timestamp and letting user to create a new instance of tektonconfig after deletion. Signed-off-by: Shivam Mukhade --- pkg/reconciler/shared/tektonconfig/instance.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/reconciler/shared/tektonconfig/instance.go b/pkg/reconciler/shared/tektonconfig/instance.go index 990e363e4e..4852d434ec 100644 --- a/pkg/reconciler/shared/tektonconfig/instance.go +++ b/pkg/reconciler/shared/tektonconfig/instance.go @@ -75,11 +75,6 @@ func (tc tektonConfig) ensureInstance(ctx context.Context) { OperatorV1alpha1(). TektonConfigs().Get(context.TODO(), DefaultCRName, metav1.GetOptions{}) if err == nil { - if !instance.GetDeletionTimestamp().IsZero() { - // log deleting timestamp error and retry - logger.Errorf("deletionTimestamp is set on existing Tektonconfig instance, Name: %w", instance.GetName()) - return false, nil - } return true, nil } if !apierrs.IsNotFound(err) {