Skip to content

Commit

Permalink
dogswatch: revise log to debuggable logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jahkeup committed Nov 12, 2019
1 parent 990ace3 commit 7e86d64
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions extras/dogswatch/pkg/k8sutil/marker.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package k8sutil

import (
"github.com/amazonlinux/thar/dogswatch/pkg/logging"
"github.com/amazonlinux/thar/dogswatch/pkg/marker"

"github.com/pkg/errors"
v1meta "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/client-go/kubernetes/typed/core/v1"
Expand All @@ -13,12 +15,12 @@ func PostMetadata(nc v1.NodeInterface, nodeName string, cont marker.Container) e
return errors.WithMessage(err, "unable to get node")
}
marker.OverwriteFrom(cont, node)
// {
// l := logging.New("k8sutil")
// l.Debugf("annotations: %#v", node.GetAnnotations())
// l.Debugf("labels: %#v", node.GetLabels())
// }
node, err = nc.Update(node)
if logging.Debuggable {
l := logging.New("k8sutil")
l.Debugf("annotations: %#v", node.GetAnnotations())
l.Debugf("labels: %#v", node.GetLabels())
}
_, err = nc.Update(node)
if err != nil {
return errors.WithMessage(err, "unable to update node")
}
Expand Down

0 comments on commit 7e86d64

Please sign in to comment.