Skip to content

Commit

Permalink
Removed default hostname-override
Browse files Browse the repository at this point in the history
Signed-off-by: Dmytro Oboznyi <[email protected]>
  • Loading branch information
Dmytro Oboznyi committed Jan 16, 2021
1 parent 75f8adf commit 4a1ec5c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pkg/model/components/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,10 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
klog.V(1).Infof("Cloud Provider: %s", cloudProvider)
if cloudProvider == kops.CloudProviderAWS {
clusterSpec.Kubelet.CloudProvider = "aws"

// Use the hostname from the AWS metadata service
// if hostnameOverride is not set.
if clusterSpec.Kubelet.HostnameOverride == "" {
clusterSpec.Kubelet.HostnameOverride = "@aws"
}
}

if cloudProvider == kops.CloudProviderDO {
clusterSpec.Kubelet.CloudProvider = "external"
clusterSpec.Kubelet.HostnameOverride = "@digitalocean"
}

if cloudProvider == kops.CloudProviderGCE {
Expand All @@ -152,12 +145,6 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
}
clusterSpec.CloudConfig.Multizone = fi.Bool(true)
clusterSpec.CloudConfig.NodeTags = fi.String(GCETagForRole(b.ClusterName, kops.InstanceGroupRoleNode))

// Use the hostname from the GCE metadata service
// if hostnameOverride is not set.
if clusterSpec.Kubelet.HostnameOverride == "" {
clusterSpec.Kubelet.HostnameOverride = "@gce"
}
}

if cloudProvider == kops.CloudProviderOpenstack {
Expand All @@ -166,7 +153,6 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {

if cloudProvider == kops.CloudProviderALI {
clusterSpec.Kubelet.CloudProvider = "alicloud"
clusterSpec.Kubelet.HostnameOverride = "@alicloud"
}

if clusterSpec.ExternalCloudControllerManager != nil {
Expand Down

0 comments on commit 4a1ec5c

Please sign in to comment.