You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components/README.md
+99-53Lines changed: 99 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,10 +37,10 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
37
37
-[ ] (R) Design details are appropriately documented
38
38
-[ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
39
39
-[ ] e2e Tests for all Beta API Operations (endpoints)
40
-
-[ ] (R) Ensure GA e2e tests for meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
40
+
-[ ] (R) Ensure GA e2e tests for meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
41
41
-[ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
42
42
-[ ] (R) Graduation criteria is in place
43
-
-[ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
43
+
-[ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
44
44
-[ ] (R) Production readiness review completed
45
45
-[ ] (R) Production readiness review approved
46
46
-[ ] "Implementation History" section is up-to-date for milestone
@@ -55,29 +55,42 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
55
55
## Summary
56
56
57
57
This KEP proposes to deprecate and in the future to remove a subset of the klog
58
-
command line flags from Kubernetes components to encourage more diverse
59
-
approaches to logging in kubernetes ecosystem logging.
58
+
command line flags from Kubernetes components, with goal of making logging of
59
+
k8s core components simpler, easier to maintain and extend by community.
60
60
61
61
## Motivation
62
62
63
-
Early on Kubernetes adopted glog logging library for logging. Overtime the glog
64
-
was forked to klog and multiple improvements were implemented, but features put
65
-
into klog only piled up and were never removed. Introduction of alternative log
66
-
formats like JSON created a conundrum, should we implement all klog features for
67
-
JSON? Most of them don't make sense and method for their configuration leaves
68
-
much to be desired. Klog features are controlled by set of global flags that
69
-
remain last bastion of global state in k/k repository. Those flags don't have a
70
-
single naming standard (some start with log prefix, some not), don't comply to
71
-
k8s flag naming (use underscore instead of hyphen) and many other problems. We
72
-
need to revisit how logging configuration is done in klog so it can work with
73
-
alternative log formats and comply with current best practices.
74
-
75
-
Large number of features added to klog has lead to large drop in quality.
76
-
[#90804](https://github.com/kubernetes/kubernetes/pull/90804) shows example
77
-
where kubeup (canonical way to deploy kubernetes for testing) could not use
78
-
klog feature to write log files due to scalability issues. The maintainers of
79
-
klog decided it's easier to re-implementing a canonical klog feature in external
80
-
project than debugging the underlying problem.
63
+
Early on Kubernetes adopted glog logging library for logging. There was no
64
+
larger motivation for picking glog, as the Go ecosystem was in its infancy at
65
+
that time and there were no alternatives. As Kubernetes community needs grew
66
+
glog was not flexible enough, prompting creation of its fork klog. By forking we
67
+
inherited a lot of glog features that we never intended to support. Introduction
68
+
of alternative log formats like JSON created a conundrum, should we implement
69
+
all klog features for JSON? Most of them don't make sense and method for their
70
+
configuration leaves much to be desired. Klog features are controlled by set of
71
+
global flags that remain last bastion of global state in k/k repository. Those
72
+
flags don't have a single naming standard (some start with log prefix, some
73
+
not), don't comply to k8s flag naming (use underscore instead of hyphen) and
74
+
many other problems. We need to revisit how logging configuration is done in
75
+
klog, so it can work with alternative log formats and comply with current best
76
+
practices.
77
+
78
+
Lack of investment and growing number of klog features impacted project quality.
79
+
Klog has multiple problems, including:
80
+
* performance is much worse than alternatives, for example 7-8x than
0 commit comments