fix qemu initialization

This commit is contained in:
Leonard Cohnen 2022-09-02 20:19:20 +02:00 committed by 3u13r
parent a09c53a700
commit 7b00005ed6
3 changed files with 30 additions and 6 deletions

View file

@ -262,9 +262,11 @@ func (k *KubeWrapper) JoinCluster(ctx context.Context, args *kubeadm.BootstrapTo
providerID = instance.ProviderID
nodeName = instance.Name
nodeInternalIP = instance.VPCIP
loadbalancerEndpoint, err = k.providerMetadata.GetLoadBalancerEndpoint(ctx)
if err != nil {
return fmt.Errorf("retrieving loadbalancer endpoint: %w", err)
if k.providerMetadata.SupportsLoadBalancer() {
loadbalancerEndpoint, err = k.providerMetadata.GetLoadBalancerEndpoint(ctx)
if err != nil {
return fmt.Errorf("retrieving loadbalancer endpoint: %w", err)
}
}
}
nodeName = k8sCompliantHostname(nodeName)