Skip to content

Commit

Permalink
Merge pull request #1386 from tahsinrahman/explicit-client-ms
Browse files Browse the repository at this point in the history
🏃 MachineSetReconciler: make Client a proper field
  • Loading branch information
k8s-ci-robot authored Sep 5, 2019
2 parents 44cf8e2 + 7636978 commit c5952ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/machineset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ var (

// MachineSetReconciler reconciles a MachineSet object
type MachineSetReconciler struct {
client.Client
Log logr.Logger
Client client.Client
Log logr.Logger

recorder record.EventRecorder
}
Expand All @@ -88,7 +88,7 @@ func (r *MachineSetReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)
_ = r.Log.WithValues("machineset", req.NamespacedName)

machineSet := &clusterv1.MachineSet{}
if err := r.Get(ctx, req.NamespacedName, machineSet); err != nil {
if err := r.Client.Get(ctx, req.NamespacedName, machineSet); err != nil {
if apierrors.IsNotFound(err) {
// Object not found, return. Created objects are automatically garbage collected.
// For additional cleanup logic use finalizers.
Expand Down

0 comments on commit c5952ee

Please sign in to comment.