Log correct runner that was deleted (#349)
This commit is contained in:
parent
1d1453c5f2
commit
31e5e61155
|
|
@ -20,9 +20,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
gogithub "github.com/google/go-github/v33/github"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
gogithub "github.com/google/go-github/v33/github"
|
||||||
|
|
||||||
"github.com/go-logr/logr"
|
"github.com/go-logr/logr"
|
||||||
kerrors "k8s.io/apimachinery/pkg/api/errors"
|
kerrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
|
@ -159,7 +160,6 @@ func (r *RunnerReplicaSetReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e
|
||||||
if offline {
|
if offline {
|
||||||
notBusy = append(notBusy, runner)
|
notBusy = append(notBusy, runner)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if !busy {
|
} else if !busy {
|
||||||
notBusy = append(notBusy, runner)
|
notBusy = append(notBusy, runner)
|
||||||
}
|
}
|
||||||
|
|
@ -176,7 +176,7 @@ func (r *RunnerReplicaSetReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e
|
||||||
return ctrl.Result{}, err
|
return ctrl.Result{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Recorder.Event(&rs, corev1.EventTypeNormal, "RunnerDeleted", fmt.Sprintf("Deleted runner '%s'", myRunners[i].Name))
|
r.Recorder.Event(&rs, corev1.EventTypeNormal, "RunnerDeleted", fmt.Sprintf("Deleted runner '%s'", notBusy[i].Name))
|
||||||
log.Info("Deleted runner", "runnerreplicaset", rs.ObjectMeta.Name)
|
log.Info("Deleted runner", "runnerreplicaset", rs.ObjectMeta.Name)
|
||||||
}
|
}
|
||||||
} else if desired > available {
|
} else if desired > available {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue