From 9c6b42af46ed9f541fefa65a8a1e175ecd0a7c34 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 4 Jan 2024 18:10:04 +0100 Subject: [PATCH] promote contextual logging to beta, enabled by default As discussed in https://github.com/kubernetes/enhancements/pull/4219#issuecomment-1807811995 benchstat reports no significant difference in most test cases for scheduler_perf for -v3. At -v5, there is some slowdown, but that is justified because the output becomes more useful for debugging. Enabling the feature by default ensures that log output becomes better regardless whether users know and remember to enable it. --- .../k8s.io/component-base/logs/api/v1/kube_features.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/staging/src/k8s.io/component-base/logs/api/v1/kube_features.go b/staging/src/k8s.io/component-base/logs/api/v1/kube_features.go index ae434ecd644..4cfc69f8919 100644 --- a/staging/src/k8s.io/component-base/logs/api/v1/kube_features.go +++ b/staging/src/k8s.io/component-base/logs/api/v1/kube_features.go @@ -24,15 +24,17 @@ const ( // owner: @pohly // kep: https://kep.k8s.io/3077 // alpha: v1.24 + // beta: v1.30 // // Enables looking up a logger from a context.Context instead of using // the global fallback logger and manipulating the logger that is // used by a call chain. ContextualLogging featuregate.Feature = "ContextualLogging" - // contextualLoggingDefault must remain false while in alpha. It can - // become true in beta. - contextualLoggingDefault = false + // contextualLoggingDefault is now true because the feature reached beta + // and performance comparisons showed no relevant degradation when + // enabling it. + contextualLoggingDefault = true // Allow fine-tuning of experimental, alpha-quality logging options. // @@ -57,7 +59,7 @@ const ( func featureGates() map[featuregate.Feature]featuregate.FeatureSpec { return map[featuregate.Feature]featuregate.FeatureSpec{ - ContextualLogging: {Default: contextualLoggingDefault, PreRelease: featuregate.Alpha}, + ContextualLogging: {Default: contextualLoggingDefault, PreRelease: featuregate.Beta}, LoggingAlphaOptions: {Default: false, PreRelease: featuregate.Alpha}, LoggingBetaOptions: {Default: true, PreRelease: featuregate.Beta},