digitalocean/digitalocean-cloud-controller-manager

Allow the region to be explicitly specified instead of using the Region metadata API

xmudrii opened this issue · 5 comments

This is a feature request to allow the region to be explicitly specified instead of using the Region metadata API. The reason for this is to allow setups where the CCM is not running on a DigitalOcean Droplet. For example, the CCM might be running in some management cluster (which might not be a cluster running on DigitalOcean), along with the other control plane compoenents, while the worker nodes are running on DigitalOcean.

The function used the determine the region supports overriding the region with the FAKE_REGION environment variable. However, it's explicitly mentioned that it is only for testing, so I doesn't feel safe to use it in production.

As a resolution, it would be nice if FAKE_REGION could be renamed to something that's not only for testing, e.g. that it feels safer to use it in production. Alternatively, this might be a CLI flag.

Hey, i would like to work on this :)
/assign

Marko and I talked about this one on the Kubernetes Slack some time ago. This request does seem legitimate to me, especially given that we have had a similar need with our CSI driver and implemented it accordingly.

My suggestion would be to rename FAKE_REGION to REGION and let it take precedence if specified. The docs should be updated accordingly.

Our CCM is still at 0.x, so we shouldn't need to worry about backwards compatibility for a development-only feature.

Thanks for taking over this one @shatoboar.

Now that #513 is merged, can this be closed?

Release is yet to be done; but yeah, we can close the issue out already.

Thanks for reminding me @almereyda.