mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
Add ability to disable proxy hostname check
This commit is contained in:
parent
d0ab390dd7
commit
f1b184a9d0
@ -53,6 +53,8 @@ type nodeStrategy struct {
|
||||
// objects.
|
||||
var Strategy = nodeStrategy{legacyscheme.Scheme, names.SimpleNameGenerator}
|
||||
|
||||
var DisableProxyHostnameCheck = false
|
||||
|
||||
// NamespaceScoped is false for nodes.
|
||||
func (nodeStrategy) NamespaceScoped() bool {
|
||||
return false
|
||||
@ -270,6 +272,9 @@ func ResourceLocation(getter ResourceGetter, connection client.ConnectionInfoGet
|
||||
}
|
||||
|
||||
func isProxyableHostname(ctx context.Context, hostname string) error {
|
||||
if DisableProxyHostnameCheck {
|
||||
return nil
|
||||
}
|
||||
resp, err := net.DefaultResolver.LookupIPAddr(ctx, hostname)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user