mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #74217 from justinsb/add_comment_about_why_insecure_address_is_not_removed
Add code comments to guard inadvertent removal of insecure-bind-address
This commit is contained in:
commit
72be2f40b7
@ -69,11 +69,13 @@ func (s *DeprecatedInsecureServingOptions) AddFlags(fs *pflag.FlagSet) {
|
|||||||
|
|
||||||
fs.IPVar(&s.BindAddress, "insecure-bind-address", s.BindAddress, ""+
|
fs.IPVar(&s.BindAddress, "insecure-bind-address", s.BindAddress, ""+
|
||||||
"The IP address on which to serve the --insecure-port (set to 0.0.0.0 for all IPv4 interfaces and :: for all IPv6 interfaces).")
|
"The IP address on which to serve the --insecure-port (set to 0.0.0.0 for all IPv4 interfaces and :: for all IPv6 interfaces).")
|
||||||
|
// Though this flag is deprecated, we discovered security concerns over how to do health checks without it e.g. #43784
|
||||||
fs.MarkDeprecated("insecure-bind-address", "This flag will be removed in a future version.")
|
fs.MarkDeprecated("insecure-bind-address", "This flag will be removed in a future version.")
|
||||||
fs.Lookup("insecure-bind-address").Hidden = false
|
fs.Lookup("insecure-bind-address").Hidden = false
|
||||||
|
|
||||||
fs.IntVar(&s.BindPort, "insecure-port", s.BindPort, ""+
|
fs.IntVar(&s.BindPort, "insecure-port", s.BindPort, ""+
|
||||||
"The port on which to serve unsecured, unauthenticated access.")
|
"The port on which to serve unsecured, unauthenticated access.")
|
||||||
|
// Though this flag is deprecated, we discovered security concerns over how to do health checks without it e.g. #43784
|
||||||
fs.MarkDeprecated("insecure-port", "This flag will be removed in a future version.")
|
fs.MarkDeprecated("insecure-port", "This flag will be removed in a future version.")
|
||||||
fs.Lookup("insecure-port").Hidden = false
|
fs.Lookup("insecure-port").Hidden = false
|
||||||
}
|
}
|
||||||
@ -130,7 +132,8 @@ func (o *DeprecatedInsecureServingOptions) WithLoopback() *DeprecatedInsecureSer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DeprecatedInsecureServingOptionsWithLoopback adds loopback functionality to the DeprecatedInsecureServingOptions.
|
// DeprecatedInsecureServingOptionsWithLoopback adds loopback functionality to the DeprecatedInsecureServingOptions.
|
||||||
// DEPRECATED: all insecure serving options are removed in a future version
|
// DEPRECATED: all insecure serving options will be removed in a future version, however note that
|
||||||
|
// there are security concerns over how health checks can work here - see e.g. #43784
|
||||||
type DeprecatedInsecureServingOptionsWithLoopback struct {
|
type DeprecatedInsecureServingOptionsWithLoopback struct {
|
||||||
*DeprecatedInsecureServingOptions
|
*DeprecatedInsecureServingOptions
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user