From e933f385adcb1926166a2497e5a75f88203c4fbd Mon Sep 17 00:00:00 2001 From: Steve Sloka Date: Thu, 7 Feb 2019 20:45:21 -0500 Subject: [PATCH] Fix daemonset logging Signed-off-by: Steve Sloka --- pkg/k8sutil/daemonsets.go | 6 +++--- pkg/k8sutil/k8sutil.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/k8sutil/daemonsets.go b/pkg/k8sutil/daemonsets.go index 05330d190..e9af17882 100644 --- a/pkg/k8sutil/daemonsets.go +++ b/pkg/k8sutil/daemonsets.go @@ -26,7 +26,7 @@ package k8sutil import ( "github.com/Sirupsen/logrus" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -43,7 +43,7 @@ func (k *K8sutil) CreateNodeInitDaemonset() error { if err != nil && len(ds.Name) == 0 { - logrus.Infof("Daemonset %s not found, creating...", ds) + logrus.Infof("Daemonset %s/%s not found, creating...", ds.Namespace, ds.Name) resourceCPU, _ := resource.ParseQuantity("10m") resourceMemory, _ := resource.ParseQuantity("50Mi") @@ -100,7 +100,7 @@ func (k *K8sutil) CreateNodeInitDaemonset() error { _, err = k.Kclient.ExtensionsV1beta1().DaemonSets(k.InitDaemonsetNamespace).Create(daemonset) } else { - logrus.Infof("Daemonset %s already exist, skipping creation ...", ds) + logrus.Infof("Daemonset %s/%s already exist, skipping creation ...", ds.Namespace, ds.Name) } return err diff --git a/pkg/k8sutil/k8sutil.go b/pkg/k8sutil/k8sutil.go index 111d3dace..c1870d6ab 100644 --- a/pkg/k8sutil/k8sutil.go +++ b/pkg/k8sutil/k8sutil.go @@ -226,7 +226,7 @@ func (k *K8sutil) CreateKubernetesCustomResourceDefinition() error { panic(err) } } else { - logrus.Infof("SKIPPING: already exists %#v\n", crd.ObjectMeta.Name) + logrus.Infof("SKIPPING: already exists %#v", crd.ObjectMeta.Name) } return nil