digitalocean-cloud-controller-manager icon indicating copy to clipboard operation
digitalocean-cloud-controller-manager copied to clipboard

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

Open xmudrii opened this issue 3 years ago • 3 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.

xmudrii avatar Aug 30 '22 13:08 xmudrii

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

shatoboar avatar Aug 30 '22 13:08 shatoboar

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.

timoreimann avatar Aug 30 '22 17:08 timoreimann

Thanks for taking over this one @shatoboar.

timoreimann avatar Aug 30 '22 17:08 timoreimann

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

almereyda avatar Oct 11 '22 13:10 almereyda

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

Thanks for reminding me @almereyda.

timoreimann avatar Oct 11 '22 13:10 timoreimann