Skip to content

Commit

Permalink
Removes deletion timestamp check in Autocreation of TektonConfig
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Shivam Mukhade committed Sep 24, 2021
1 parent 2bed57e commit 27b712d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/reconciler/shared/tektonconfig/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 27b712d

Please sign in to comment.