mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #21593 from fabianofranz/split_bind_flags
Auto commit by PR queue bot
This commit is contained in:
commit
e089e841b1
@ -152,6 +152,7 @@ Find more information at https://github.com/kubernetes/kubernetes.`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
f.BindFlags(cmds.PersistentFlags())
|
f.BindFlags(cmds.PersistentFlags())
|
||||||
|
f.BindExternalFlags(cmds.PersistentFlags())
|
||||||
|
|
||||||
// From this point and forward we get warnings on flags that contain "_" separators
|
// From this point and forward we get warnings on flags that contain "_" separators
|
||||||
cmds.SetGlobalNormalizationFunc(util.WarnWordSepNormalizeFunc)
|
cmds.SetGlobalNormalizationFunc(util.WarnWordSepNormalizeFunc)
|
||||||
|
@ -585,9 +585,6 @@ func (f *Factory) Command() string {
|
|||||||
|
|
||||||
// BindFlags adds any flags that are common to all kubectl sub commands.
|
// BindFlags adds any flags that are common to all kubectl sub commands.
|
||||||
func (f *Factory) BindFlags(flags *pflag.FlagSet) {
|
func (f *Factory) BindFlags(flags *pflag.FlagSet) {
|
||||||
// any flags defined by external projects (not part of pflags)
|
|
||||||
flags.AddGoFlagSet(flag.CommandLine)
|
|
||||||
|
|
||||||
// Merge factory's flags
|
// Merge factory's flags
|
||||||
flags.AddFlagSet(f.flags)
|
flags.AddFlagSet(f.flags)
|
||||||
|
|
||||||
@ -602,6 +599,12 @@ func (f *Factory) BindFlags(flags *pflag.FlagSet) {
|
|||||||
flags.SetNormalizeFunc(util.WordSepNormalizeFunc)
|
flags.SetNormalizeFunc(util.WordSepNormalizeFunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BindCommonFlags adds any flags defined by external projects (not part of pflags)
|
||||||
|
func (f *Factory) BindExternalFlags(flags *pflag.FlagSet) {
|
||||||
|
// any flags defined by external projects (not part of pflags)
|
||||||
|
flags.AddGoFlagSet(flag.CommandLine)
|
||||||
|
}
|
||||||
|
|
||||||
func getPorts(spec api.PodSpec) []string {
|
func getPorts(spec api.PodSpec) []string {
|
||||||
result := []string{}
|
result := []string{}
|
||||||
for _, container := range spec.Containers {
|
for _, container := range spec.Containers {
|
||||||
|
Loading…
Reference in New Issue
Block a user