From 889e4c13517d97dbfdaa34f738a7ade4ea351781 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 17 Aug 2022 10:07:26 +0300 Subject: [PATCH] nfd-master: more fixes to log messages Use correct name for the CR (NodeFeatureRule) object. Also, the resource is cluster-scoped so don't print the namespace. --- pkg/nfd-master/nfd-master.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/nfd-master/nfd-master.go b/pkg/nfd-master/nfd-master.go index 4f3b51ada..1084f1105 100644 --- a/pkg/nfd-master/nfd-master.go +++ b/pkg/nfd-master/nfd-master.go @@ -182,7 +182,7 @@ func (m *nfdMaster) Run() error { if err != nil { return err } - klog.Info("starting nfd LabelRule controller") + klog.Info("starting nfd api controller") m.nfdController = newNfdController(kubeconfig) } @@ -509,7 +509,7 @@ func (m *nfdMaster) crLabels(r *pb.SetLabelsRequest) map[string]string { }) if err != nil { - klog.Errorf("failed to list LabelRule resources: %w", err) + klog.Errorf("failed to list NodeFeatureRule resources: %w", err) return nil } @@ -517,10 +517,10 @@ func (m *nfdMaster) crLabels(r *pb.SetLabelsRequest) map[string]string { for _, spec := range ruleSpecs { switch { case klog.V(3).Enabled(): - h := fmt.Sprintf("executing LabelRule \"%s/%s\":", spec.ObjectMeta.Namespace, spec.ObjectMeta.Name) + h := fmt.Sprintf("executing NodeFeatureRule %q:", spec.ObjectMeta.Name) utils.KlogDump(3, h, " ", spec.Spec) case klog.V(1).Enabled(): - klog.Infof("executing LabelRule \"%s/%s\"", spec.ObjectMeta.Namespace, spec.ObjectMeta.Name) + klog.Infof("executing NodeFeatureRule %q", spec.ObjectMeta.Name) } for _, rule := range spec.Spec.Rules { ruleOut, err := rule.Execute(r.Features)