Skip to content

Commit d0bd60c

Browse files
authored
Merge pull request kubernetes-sigs#7955 from sbueringer/pr-add-klog-flag-note
🌱 logging: add removal note, cleanup no-op code
2 parents b912797 + f9397f2 commit d0bd60c

File tree

7 files changed

+5
-6
lines changed

7 files changed

+5
-6
lines changed

bootstrap/kubeadm/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ var (
9292

9393
// InitFlags initializes this manager's flags.
9494
func InitFlags(fs *pflag.FlagSet) {
95-
logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())
9695
logsv1.AddFlags(logOptions, fs)
9796

9897
fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080",

controlplane/kubeadm/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ var (
9898

9999
// InitFlags initializes the flags.
100100
func InitFlags(fs *pflag.FlagSet) {
101-
logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())
102101
logsv1.AddFlags(logOptions, fs)
103102

104103
fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080",

docs/book/src/developer/providers/v1.3-to-v1.4.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ maintainers of providers and consumers of our Go API.
4141
- `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`.
4242
- `WatchDeploymentLogs` is changed to `WatchDeploymentLogsByName`, it works same as before. Another function `WatchDeploymentLogsByLabelSelector` is added to stream logs of deployment by label selector.
4343
- Cluster API controllers are now using an explicit security context by default.
44+
- 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
45+
`v0.26.0` this function is not configuring any flags anymore.
46+
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`,
47+
`--log-dir`, `--log-file`, `--log-file-max-size`, `--logtostderr`, `--one-output`, `--skip-headers`, `--skip-log-headers` and `--stderrthreshold`.
48+
For more information, please see: https://github.com/kubernetes/enhancements/issues/2845
4449

4550
### Suggested changes for providers
4651

docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func init() {
7474
// InitFlags initializes the flags.
7575
func InitFlags(fs *pflag.FlagSet) {
7676
// Initialize logs flags using Kubernetes component-base machinery.
77-
logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())
7877
logsv1.AddFlags(logOptions, fs)
7978

8079
// Add test-extension specific flags

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ func init() {
131131

132132
// InitFlags initializes the flags.
133133
func InitFlags(fs *pflag.FlagSet) {
134-
logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())
135134
logsv1.AddFlags(logOptions, fs)
136135

137136
fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080",

test/extension/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ func InitFlags(fs *pflag.FlagSet) {
7979
// Initialize logs flags using Kubernetes component-base machinery.
8080
// NOTE: it is not mandatory to use Kubernetes component-base machinery in custom RuntimeExtension, but it is
8181
// recommended because it helps in ensuring consistency across different components in the cluster.
82-
logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())
8382
logsv1.AddFlags(logOptions, fs)
8483

8584
// Add test-extension specific flags

test/infrastructure/docker/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ func init() {
8585
}
8686

8787
func initFlags(fs *pflag.FlagSet) {
88-
logs.AddFlags(fs, logs.SkipLoggingConfigurationFlags())
8988
logsv1.AddFlags(logOptions, fs)
9089

9190
fs.StringVar(&metricsBindAddr, "metrics-bind-addr", "localhost:8080",

0 commit comments

Comments
 (0)