Skip to content

Commit

Permalink
Merge pull request #1713 from marquiz/devel/worker-log-fix
Browse files Browse the repository at this point in the history
nfd-worker: improved log when creating NodeFeature object
  • Loading branch information
k8s-ci-robot committed May 24, 2024
2 parents 80d74cd + 6490369 commit 5fe3433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nfd-worker/nfd-worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,6 @@ func (m *nfdWorker) updateNodeFeatureObject(labels Labels) error {
// TODO: we could implement some simple caching of the object, only get it
// every 10 minutes or so because nobody else should really be modifying it
if nfr, err := cli.NfdV1alpha1().NodeFeatures(namespace).Get(context.TODO(), nodename, metav1.GetOptions{}); errors.IsNotFound(err) {
klog.InfoS("creating NodeFeature object", "nodefeature", klog.KObj(nfr))
nfr = &nfdv1alpha1.NodeFeature{
ObjectMeta: metav1.ObjectMeta{
Name: nodename,
Expand All @@ -748,6 +747,7 @@ func (m *nfdWorker) updateNodeFeatureObject(labels Labels) error {
Labels: labels,
},
}
klog.InfoS("creating NodeFeature object", "nodefeature", klog.KObj(nfr))

nfrCreated, err := cli.NfdV1alpha1().NodeFeatures(namespace).Create(context.TODO(), nfr, metav1.CreateOptions{})
if err != nil {
Expand Down

0 comments on commit 5fe3433

Please sign in to comment.