mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-12 20:46:47 +00:00
Cleanup extra block in runner controller (#1174)
This commit is contained in:
committed by
GitHub
parent
1917cf90c4
commit
4a0f68bfe3
@@ -113,9 +113,6 @@ func (r *RunnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
|
|||||||
return ctrl.Result{}, nil
|
return ctrl.Result{}, nil
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var p *corev1.Pod
|
|
||||||
|
|
||||||
{
|
|
||||||
var pod corev1.Pod
|
var pod corev1.Pod
|
||||||
if err := r.Get(ctx, req.NamespacedName, &pod); err != nil {
|
if err := r.Get(ctx, req.NamespacedName, &pod); err != nil {
|
||||||
if !kerrors.IsNotFound(err) {
|
if !kerrors.IsNotFound(err) {
|
||||||
@@ -123,13 +120,10 @@ func (r *RunnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
|
|||||||
|
|
||||||
return ctrl.Result{Requeue: true}, nil
|
return ctrl.Result{Requeue: true}, nil
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
p = &pod
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request to remove a runner. DeletionTimestamp was set in the runner - we need to unregister runner
|
// Request to remove a runner. DeletionTimestamp was set in the runner - we need to unregister runner
|
||||||
return r.processRunnerDeletion(runner, ctx, log, p)
|
return r.processRunnerDeletion(runner, ctx, log, &pod)
|
||||||
}
|
}
|
||||||
|
|
||||||
registrationOnly := metav1.HasAnnotation(runner.ObjectMeta, annotationKeyRegistrationOnly)
|
registrationOnly := metav1.HasAnnotation(runner.ObjectMeta, annotationKeyRegistrationOnly)
|
||||||
|
|||||||
Reference in New Issue
Block a user