kubernetes/pkg/controller
Patrick Ohly 9eaa2dc554 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.
2022-01-12 07:48:36 +01:00
..
apis/config Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
bootstrap Merge pull request #105510 from damemi/wire-contexts-bootstrap 2021-11-02 14:27:42 -07:00
certificates fix curent to current 2021-12-17 03:33:22 +09:00
clusterroleaggregation Wire contexts to RBAC controllers 2021-10-07 15:04:49 -04:00
cronjob Merge pull request #105264 from devincd/fix_typo 2022-01-06 17:40:29 -08:00
daemon Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
deployment Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
disruption Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
endpoint Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
endpointslice Improving performance of EndpointSlice controller metrics cache 2021-12-20 10:26:47 -08:00
endpointslicemirroring Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
garbagecollector refactor garbagecollection controllers to make forget impossible to forget 2022-01-09 15:19:10 +08:00
history Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
job Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
namespace Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
nodeipam Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
nodelifecycle avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
podautoscaler Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
podgc Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
replicaset avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
replication Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
resourcequota avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
serviceaccount Merge pull request #102636 from charlesxsh/svcacct-ctrl-test 2022-01-05 21:12:27 -08:00
statefulset Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
storageversiongc Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
testutil Migrate to k8s.io/utils/clock in pkg/controller 2021-09-10 11:42:32 +02:00
ttl Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
ttlafterfinished Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
util Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
volume avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
controller_ref_manager_test.go Merge pull request #101250 from evertrain/master 2021-11-10 09:19:26 -08:00
controller_ref_manager.go Wire contexts to Batch controllers (#105491) 2021-11-10 14:56:46 -08:00
controller_utils_test.go Wire contexts to Batch controllers (#105491) 2021-11-10 14:56:46 -08:00
controller_utils.go Wire contexts to Batch controllers (#105491) 2021-11-10 14:56:46 -08:00
doc.go
lookup_cache.go
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00