From f1b184a9d0faee0c93aa5b4a8681f7aa3b537d45 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Thu, 7 Feb 2019 20:53:55 -0700 Subject: [PATCH] Add ability to disable proxy hostname check --- pkg/registry/core/node/strategy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/registry/core/node/strategy.go b/pkg/registry/core/node/strategy.go index a699f084511..28146f3464b 100644 --- a/pkg/registry/core/node/strategy.go +++ b/pkg/registry/core/node/strategy.go @@ -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