mirror of
https://github.com/rancher/rke.git
synced 2025-09-13 13:40:22 +00:00
delete hostname-override for aws cloud provider
aws cloud provider assigns private dns as the node name, don't override it since it cannot be changed.
This commit is contained in:
@@ -472,7 +472,11 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host, serviceOptions v3.Kubern
|
||||
if host.IsWindows() { // compatible with Windows
|
||||
CommandArgs["cloud-config"] = path.Join(host.PrefixPath, cloudConfigFileName)
|
||||
}
|
||||
if c.CloudProvider.Name == k8s.AWSCloudProvider {
|
||||
delete(CommandArgs, "hostname-override")
|
||||
}
|
||||
}
|
||||
|
||||
if c.IsKubeletGenerateServingCertificateEnabled() {
|
||||
CommandArgs["tls-cert-file"] = pki.GetCertPath(pki.GetCrtNameForHost(host, pki.KubeletCertName))
|
||||
CommandArgs["tls-private-key-file"] = pki.GetCertPath(fmt.Sprintf("%s-key", pki.GetCrtNameForHost(host, pki.KubeletCertName)))
|
||||
@@ -649,6 +653,9 @@ func (c *Cluster) BuildKubeProxyProcess(host *hosts.Host, serviceOptions v3.Kube
|
||||
} else {
|
||||
CommandArgs["bind-address"] = host.Address
|
||||
}
|
||||
if c.CloudProvider.Name == k8s.AWSCloudProvider {
|
||||
delete(CommandArgs, "hostname-override")
|
||||
}
|
||||
}
|
||||
|
||||
// Best security practice is to listen on localhost, but DinD uses private container network instead of Host.
|
||||
|
Reference in New Issue
Block a user