Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
e0ne committed Aug 7, 2023
1 parent a0b8b14 commit dcc81ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions controllers/migration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package controllers

import (
"context"
"fmt"
v1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1"
constants "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/consts"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -47,15 +46,16 @@ func (mr *MigrationReconciler) Reconcile(ctx context.Context, req ctrl.Request)
reqLogger.Error(err, "Error occurred on GET SriovNetworkNodeState request from API server.")
return reconcile.Result{}, err
}
patch := []byte(fmt.Sprintf(`{"status":{"drainStatus":"%s"}}`, anno))
err = mr.Client.Patch(context.TODO(), nodeState, client.RawPatch(types.StrategicMergePatchType, patch))
if err != nil {
reqLogger.Error(err, "Error occurred on SriovNetworkNodeState update.")
return reconcile.Result{}, err
}
nodeState.Status.DrainStatus = anno
//patch := []byte(fmt.Sprintf(`{"status":{"drainStatus":"%s"}}`, anno))
//err = mr.Client.Patch(context.TODO(), nodeState, client.RawPatch(types.StrategicMergePatchType, patch))
//if err != nil {
// reqLogger.Error(err, "Error occurred on SriovNetworkNodeState update.")
// return reconcile.Result{}, err
//}

}

return reconcile.Result{}, nil
}

Expand Down

0 comments on commit dcc81ce

Please sign in to comment.