Skip to content

Commit

Permalink
Merge pull request #7955 from sbueringer/pr-add-klog-flag-note
Browse files Browse the repository at this point in the history
🌱 logging: add removal note, cleanup no-op code
  • Loading branch information
k8s-ci-robot authored Jan 20, 2023
2 parents b912797 + f9397f2 commit d0bd60c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion bootstrap/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion controlplane/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions docs/book/src/developer/providers/v1.3-to-v1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion test/extension/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion test/infrastructure/docker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d0bd60c

Please sign in to comment.