Skip to content

Commit

Permalink
Merge pull request #93 from wking/log-changes
Browse files Browse the repository at this point in the history
updateMachineStatus: Log changes with ObjectReflectDiff
  • Loading branch information
openshift-merge-robot authored Oct 30, 2018
2 parents 398f019 + ece3a63 commit 0488a2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cloud/aws/actuators/machine/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/client-go/kubernetes"

providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsproviderconfig/v1alpha1"
Expand Down Expand Up @@ -134,7 +135,7 @@ func (a *Actuator) updateMachineStatus(machine *clusterv1.Machine, awsStatus *pr
}

if !equality.Semantic.DeepEqual(machine.Status, machineCopy.Status) {
glog.Info("machine status has changed, updating")
glog.Infof("machine status changed: %s", diff.ObjectReflectDiff(machine.Status, machineCopy.Status))
time := metav1.Now()
machineCopy.Status.LastUpdated = &time

Expand Down

0 comments on commit 0488a2f

Please sign in to comment.