cloud-provider-openstack icon indicating copy to clipboard operation
cloud-provider-openstack copied to clipboard

[OCCM] Add Region code to ProviderID

Open sergelogvinov opened this issue 3 years ago • 4 comments

/kind feature

What happened:

Hello. I have a multi-region OpenStack setup for one Kubernetes cluster. Each region has its independent OpenStack installation.

Currently, OCCM does not support multi-region installation. And I can launch OCCM separately in each zone, but they will affect each other. One OCCM wouldn't find an instance from another region (it will try to delete the node from different region).

All works fine if ProviderID has a region code.

Here a few changes in OCCM https://github.com/sergelogvinov/cloud-provider-openstack/commit/c102acbb0f404f64d78c92826ce308d225b9c215 (it support old and new ProviderID format)

So can I add this feature to the OCCM ?

What you expected to happen:

OLD string: ProviderID =${ProviderName}:///${instance-id} NEW string: ProviderID =${ProviderName}://${REGION}/${instance-id}

Anything else we need to know?:

Environment:

  • openstack-cloud-controller-manager(or other related binary) version:
  • OpenStack version:
  • Others:

sergelogvinov avatar May 31 '22 12:05 sergelogvinov

Sounds good and valid to me. Could you please create a PR? (and leave out the go.mod/go.sum updates).

For now, I would target v1.25, but don't see anything against backporting to v1.24.

chrigl avatar Jun 04 '22 14:06 chrigl

+1 to introduce this

so one k8s cluster in mutliple region is the use case, correct? And I think we need consider backward compatible as well

jichenjc avatar Jun 06 '22 03:06 jichenjc

Yep. One k8s-cluster (one control-plane) in two or more independent OpenStack installations.

sergelogvinov avatar Jun 06 '22 06:06 sergelogvinov

This sounds awesome! :clap: I've seen something similar in the AWS cloud-controller-manager and it makes total sense to add this.

mikejoh avatar Jun 16 '22 12:06 mikejoh