Fix gossip on DigitalOcean

We don't have a seeding mechanism for DigitalOcean (this relies on
cloud credentials, which we don't want to put on the nodes).

Instead, use the (stable) load balancer IP to connect.
This commit is contained in:
justinsb 2023-08-23 08:10:41 -04:00
parent a913d3c0db
commit 8b99c79631
2 changed files with 5 additions and 3 deletions

View File

@ -44,8 +44,8 @@ func UseKopsControllerForNodeConfig(cluster *kops.Cluster) bool {
switch cluster.Spec.GetCloudProvider() {
case kops.CloudProviderGCE:
// We can use cloud-discovery here.
case kops.CloudProviderHetzner, kops.CloudProviderScaleway:
// We don't have a cloud-discovery mechanism implemented in nodeup for hetzner,
case kops.CloudProviderHetzner, kops.CloudProviderScaleway, kops.CloudProviderDO:
// We don't have a cloud-discovery mechanism implemented in nodeup for many clouds,
// but we assume that we're using a load balancer with a fixed IP address
default:
return false

View File

@ -1458,8 +1458,10 @@ func (n *nodeUpConfigBuilder) BuildConfig(ig *kops.InstanceGroup, apiserverAddit
bootConfig.APIServerIPs = controlPlaneIPs
} else {
// If we do have a fixed IP, we use it (on some clouds, initially)
// This covers the clouds in UseKopsControllerForNodeConfig which use kops-controller for node config,
// but don't have a specialized discovery mechanism for finding kops-controller etc.
switch cluster.Spec.GetCloudProvider() {
case kops.CloudProviderHetzner, kops.CloudProviderScaleway:
case kops.CloudProviderHetzner, kops.CloudProviderScaleway, kops.CloudProviderDO:
bootConfig.APIServerIPs = controlPlaneIPs
}
}