Skip to content

Commit a02d631

Browse files
author
Tatsuhiro Tsujikawa
committed
Fix broken kind logging
If gvk.Kind is "APIService", I expect "apiService", but the current code produces and logs "aPIService". Because it is not easy to do this kind of thing, it is better to log the kind as is.
1 parent 15154aa commit a02d631

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/builder/controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,13 @@ func (blder *Builder) doController(r reconcile.Reconciler) error {
315315
"controllerKind", gvk.Kind,
316316
)
317317

318-
lowerCamelCaseKind := strings.ToLower(gvk.Kind[:1]) + gvk.Kind[1:]
318+
kind := gvk.Kind
319319

320320
ctrlOptions.LogConstructor = func(req *reconcile.Request) logr.Logger {
321321
log := log
322322
if req != nil {
323323
log = log.WithValues(
324-
lowerCamelCaseKind, klog.KRef(req.Namespace, req.Name),
324+
kind, klog.KRef(req.Namespace, req.Name),
325325
"namespace", req.Namespace, "name", req.Name,
326326
)
327327
}

0 commit comments

Comments
 (0)