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