Skip to content

Commit 0eee4a3

Browse files
ivanauthclaude
andcommitted
fix: use c.logger instead of undefined logger variable
This fixes the lint errors: - undefined: logger on lines 307, 314, 318 - unused import: k8s.io/klog/v2/textlogger 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 475f62f commit 0eee4a3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

pkg/controller/controller.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import (
4747
"k8s.io/client-go/tools/record"
4848
_ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration
4949
"k8s.io/klog/v2"
50-
"k8s.io/klog/v2/textlogger"
5150
"k8s.io/kubectl/pkg/util/openapi"
5251

5352
"github.com/authzed/spicedb-operator/pkg/apis/authzed/v1alpha1"
@@ -305,18 +304,18 @@ func (c *Controller) loadConfig(path string) {
305304
c.config = cfg
306305
// Override ImageName with flag if provided
307306
if c.baseImage != "" {
308-
logger.V(3).Info("overriding graph-defined base image with startup flag", "baseImage", c.baseImage)
307+
c.logger.V(3).Info("overriding graph-defined base image with startup flag", "baseImage", c.baseImage)
309308
c.config.ImageName = c.baseImage
310309
}
311310
}()
312311
c.lastConfigHash.Store(h)
313312
} else {
314313
// config hasn't changed
315-
logger.V(4).Info("config hasn't changed", "old hash", c.lastConfigHash.Load(), "new hash", h)
314+
c.logger.V(4).Info("config hasn't changed", "old hash", c.lastConfigHash.Load(), "new hash", h)
316315
return
317316
}
318317

319-
logger.V(3).Info("updated config", "path", path, "config", c.config)
318+
c.logger.V(3).Info("updated config", "path", path, "config", c.config)
320319

321320
// requeue all clusters
322321
for _, ns := range c.namespaces {

0 commit comments

Comments
 (0)