Merge pull request #125384 from dims/remove-gce-specific-flag-registration

Remove GCE specific flag registration
This commit is contained in:
Kubernetes Prow Robot 2024-06-12 14:47:24 -07:00 committed by GitHub
commit 0a6ad55da9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,6 @@ package app
import (
"context"
"flag"
"fmt"
"math/rand"
"os"
@ -130,14 +129,6 @@ the cloud specific control loops shipped with Kubernetes.`,
logsapi.AddFlags(logOptions, globalFlagSet)
globalflag.AddGlobalFlags(globalFlagSet, cmd.Name(), logs.SkipLoggingConfigurationFlags())
if flag.CommandLine.Lookup("cloud-provider-gce-lb-src-cidrs") != nil {
// hoist this flag from the global flagset to preserve the commandline until
// the gce cloudprovider is removed.
globalflag.Register(namedFlagSets.FlagSet("generic"), "cloud-provider-gce-lb-src-cidrs")
}
if flag.CommandLine.Lookup("cloud-provider-gce-l7lb-src-cidrs") != nil {
globalflag.Register(namedFlagSets.FlagSet("generic"), "cloud-provider-gce-l7lb-src-cidrs")
}
for _, f := range namedFlagSets.FlagSets {
fs.AddFlagSet(f)
}