diff --git a/bootstrap/kubeadm/main.go b/bootstrap/kubeadm/main.go index 04f30bfefc9b..f8e73fa12ce1 100644 --- a/bootstrap/kubeadm/main.go +++ b/bootstrap/kubeadm/main.go @@ -92,7 +92,6 @@ var ( // InitFlags initializes this manager's flags. func InitFlags(fs *pflag.FlagSet) { - logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags()) logsv1.AddFlags(logOptions, fs) fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080", diff --git a/controlplane/kubeadm/main.go b/controlplane/kubeadm/main.go index 5efa78a1236a..bc41b82db800 100644 --- a/controlplane/kubeadm/main.go +++ b/controlplane/kubeadm/main.go @@ -98,7 +98,6 @@ var ( // InitFlags initializes the flags. func InitFlags(fs *pflag.FlagSet) { - logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags()) logsv1.AddFlags(logOptions, fs) fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080", diff --git a/docs/book/src/developer/providers/v1.3-to-v1.4.md b/docs/book/src/developer/providers/v1.3-to-v1.4.md index 78011bc07d0f..bc6844e483f4 100644 --- a/docs/book/src/developer/providers/v1.3-to-v1.4.md +++ b/docs/book/src/developer/providers/v1.3-to-v1.4.md @@ -41,6 +41,11 @@ maintainers of providers and consumers of our Go API. - `clusterctl upgrade apply` no longer requires a namespace when updating providers. It is now optional and in a future release it will be deprecated. The new syntax is `[namespace/]provider:version`. - `WatchDeploymentLogs` is changed to `WatchDeploymentLogsByName`, it works same as before. Another function `WatchDeploymentLogsByLabelSelector` is added to stream logs of deployment by label selector. - Cluster API controllers are now using an explicit security context by default. +- It is recommended to drop usages of `logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())`. It was previously used to configure deprecated logging flags, but with the bump to component-base + `v0.26.0` this function is not configuring any flags anymore. + Please note that the following logging flags have been removed: (in `component-base`, but this affects all CAPI controllers): `--add-dir-header`, `--alsologtostderr`, `--log-backtrace-at`, + `--log-dir`, `--log-file`, `--log-file-max-size`, `--logtostderr`, `--one-output`, `--skip-headers`, `--skip-log-headers` and `--stderrthreshold`. + For more information, please see: https://github.com/kubernetes/enhancements/issues/2845 ### Suggested changes for providers diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md index ed4873865bf1..8d6fe937ee88 100644 --- a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md +++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md @@ -74,7 +74,6 @@ func init() { // InitFlags initializes the flags. func InitFlags(fs *pflag.FlagSet) { // Initialize logs flags using Kubernetes component-base machinery. - logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags()) logsv1.AddFlags(logOptions, fs) // Add test-extension specific flags diff --git a/main.go b/main.go index 2fc9c4f983e3..d6ddd9f99a18 100644 --- a/main.go +++ b/main.go @@ -131,7 +131,6 @@ func init() { // InitFlags initializes the flags. func InitFlags(fs *pflag.FlagSet) { - logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags()) logsv1.AddFlags(logOptions, fs) fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080", diff --git a/test/extension/main.go b/test/extension/main.go index d9ca5aa1f320..691f86e3e97c 100644 --- a/test/extension/main.go +++ b/test/extension/main.go @@ -79,7 +79,6 @@ func InitFlags(fs *pflag.FlagSet) { // Initialize logs flags using Kubernetes component-base machinery. // NOTE: it is not mandatory to use Kubernetes component-base machinery in custom RuntimeExtension, but it is // recommended because it helps in ensuring consistency across different components in the cluster. - logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags()) logsv1.AddFlags(logOptions, fs) // Add test-extension specific flags diff --git a/test/infrastructure/docker/main.go b/test/infrastructure/docker/main.go index c07d7be6ee67..e60df8622dd9 100644 --- a/test/infrastructure/docker/main.go +++ b/test/infrastructure/docker/main.go @@ -85,7 +85,6 @@ func init() { } func initFlags(fs *pflag.FlagSet) { - logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags()) logsv1.AddFlags(logOptions, fs) fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080",