Skip to content

Commit b93b5f9

Browse files
authored
⚠️ Fix broken kind logging (#1954)
* 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. * fixup! Fix broken kind logging
1 parent 15154aa commit b93b5f9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/builder/controller.go

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

318-
lowerCamelCaseKind := strings.ToLower(gvk.Kind[:1]) + gvk.Kind[1:]
319-
320318
ctrlOptions.LogConstructor = func(req *reconcile.Request) logr.Logger {
321319
log := log
322320
if req != nil {
323321
log = log.WithValues(
324-
lowerCamelCaseKind, klog.KRef(req.Namespace, req.Name),
322+
gvk.Kind, klog.KRef(req.Namespace, req.Name),
325323
"namespace", req.Namespace, "name", req.Name,
326324
)
327325
}

0 commit comments

Comments
 (0)