refactor: Extract runner pod owner management out of runnerset controller

so that it can potentially be reusable from runnerreplicaset controller
This commit is contained in:
Yusuke Kuoka
2022-03-05 10:41:52 +00:00
parent 95a5770d55
commit c95e84a528
4 changed files with 536 additions and 363 deletions

View File

@@ -165,7 +165,7 @@ func (r *RunnerPodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
runnerPod = *po
if _, unregistrationRequested := getAnnotation(&runnerPod.ObjectMeta, AnnotationKeyUnregistrationRequestTimestamp); unregistrationRequested {
if _, unregistrationRequested := getAnnotation(&runnerPod, AnnotationKeyUnregistrationRequestTimestamp); unregistrationRequested {
log.V(2).Info("Progressing unregistration because unregistration-request timestamp is set")
// At this point we're sure that DeletionTimestamp is not set yet, but the unregistration process is triggered by an upstream controller like runnerset-controller.