chore: Tidy up the deployment controller code
Removes an unnecessary condition from the deployment controller code. We assumed that the client would return a not-found error on an empty runnerset list  it is clearly not the case.
@@ -22,7 +22,6 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/go-logr/logr"
"hash/fnv"
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/rand"
"k8s.io/client-go/tools/record"
@@ -70,10 +69,8 @@ func (r *RunnerDeploymentReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e
var myRunnerSetList v1alpha1.RunnerSetList
if err := r.List(ctx, &myRunnerSetList, client.InNamespace(req.Namespace), client.MatchingFields{runnerSetOwnerKey: req.Name}); err != nil {
- if !errors.IsNotFound(err) {
return ctrl.Result{}, err
}
- }
myRunnerSets := myRunnerSetList.Items
