From b08056eb9d2ce7f611723043544bc18d4b38219b Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Wed, 3 Apr 2019 10:01:34 +0200 Subject: [PATCH] Fix error message in getCluster Previously it was showing 'Machine foo in namespace "cluster.k8s.io/cluster-name" doesn't specify "k8s-machine-api" label, assuming nil cluster' --- pkg/controller/machine/controller.go | 2 +- pkg/controller/machinedeployment/controller.go | 2 +- pkg/controller/machineset/controller.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/machine/controller.go b/pkg/controller/machine/controller.go index 3b657c1c9a53..da77d2686f13 100644 --- a/pkg/controller/machine/controller.go +++ b/pkg/controller/machine/controller.go @@ -235,7 +235,7 @@ func (r *ReconcileMachine) Reconcile(request reconcile.Request) (reconcile.Resul func (r *ReconcileMachine) getCluster(ctx context.Context, machine *clusterv1.Machine) (*clusterv1.Cluster, error) { if machine.Labels[clusterv1.MachineClusterLabelName] == "" { - klog.Infof("Machine %q in namespace %q doesn't specify %q label, assuming nil cluster", machine.Name, clusterv1.MachineClusterLabelName, machine.Namespace) + klog.Infof("Machine %q in namespace %q doesn't specify %q label, assuming nil cluster", machine.Name, machine.Namespace, clusterv1.MachineClusterLabelName) return nil, nil } diff --git a/pkg/controller/machinedeployment/controller.go b/pkg/controller/machinedeployment/controller.go index 939dea58d6de..0e86d7e2ea55 100644 --- a/pkg/controller/machinedeployment/controller.go +++ b/pkg/controller/machinedeployment/controller.go @@ -272,7 +272,7 @@ func (r *ReconcileMachineDeployment) reconcile(ctx context.Context, d *v1alpha1. func (r *ReconcileMachineDeployment) getCluster(d *v1alpha1.MachineDeployment) (*v1alpha1.Cluster, error) { if d.Spec.Template.Labels[v1alpha1.MachineClusterLabelName] == "" { - klog.Infof("Deployment %q in namespace %q doesn't specify %q label, assuming nil cluster", d.Name, v1alpha1.MachineClusterLabelName, d.Namespace) + klog.Infof("Deployment %q in namespace %q doesn't specify %q label, assuming nil cluster", d.Name, d.Namespace, v1alpha1.MachineClusterLabelName) return nil, nil } diff --git a/pkg/controller/machineset/controller.go b/pkg/controller/machineset/controller.go index b61030c5306b..b09da127af0d 100644 --- a/pkg/controller/machineset/controller.go +++ b/pkg/controller/machineset/controller.go @@ -275,7 +275,7 @@ func (r *ReconcileMachineSet) reconcile(ctx context.Context, machineSet *cluster func (r *ReconcileMachineSet) getCluster(ms *clusterv1alpha1.MachineSet) (*clusterv1alpha1.Cluster, error) { if ms.Spec.Template.Labels[clusterv1alpha1.MachineClusterLabelName] == "" { - klog.Infof("MachineSet %q in namespace %q doesn't specify %q label, assuming nil cluster", ms.Name, clusterv1alpha1.MachineClusterLabelName, ms.Namespace) + klog.Infof("MachineSet %q in namespace %q doesn't specify %q label, assuming nil cluster", ms.Name, ms.Namespace, clusterv1alpha1.MachineClusterLabelName) return nil, nil }