@@ -99,7 +99,7 @@ func (r *NodeEvictionLabelReconciler) Reconcile(ctx context.Context, req ctrl.Re
9999 value = "true"
100100 } else {
101101 // check for existing eviction, else create it
102- value , err = r .reconcileEviction (ctx , eviction , node , hostname , maintenanceValue )
102+ value , err = r .reconcileEviction (ctx , eviction , hv , hostname , maintenanceValue )
103103 if err != nil {
104104 return ctrl.Result {}, err
105105 }
@@ -125,13 +125,13 @@ func (r *NodeEvictionLabelReconciler) Reconcile(ctx context.Context, req ctrl.Re
125125 return ctrl.Result {}, k8sclient .IgnoreNotFound (err )
126126}
127127
128- func (r * NodeEvictionLabelReconciler ) reconcileEviction (ctx context.Context , eviction * kvmv1.Eviction , node * corev1. Node , hostname , maintenanceValue string ) (string , error ) {
128+ func (r * NodeEvictionLabelReconciler ) reconcileEviction (ctx context.Context , eviction * kvmv1.Eviction , hypervisor * kvmv1. Hypervisor , hostname , maintenanceValue string ) (string , error ) {
129129 log := logger .FromContext (ctx )
130130 if err := r .Get (ctx , k8sclient .ObjectKeyFromObject (eviction ), eviction ); err != nil {
131131 if ! k8serrors .IsNotFound (err ) {
132132 return "" , err
133133 }
134- if err := controllerutil .SetOwnerReference (node , eviction , r .Scheme ); err != nil {
134+ if err := controllerutil .SetOwnerReference (hypervisor , eviction , r .Scheme ); err != nil {
135135 return "" , err
136136 }
137137 log .Info ("Creating new eviction" , "name" , eviction .Name )
0 commit comments