Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OCCM] Add Region code to ProviderID #1900

Closed
sergelogvinov opened this issue May 31, 2022 · 4 comments · Fixed by #1909
Closed

[OCCM] Add Region code to ProviderID #1900

sergelogvinov opened this issue May 31, 2022 · 4 comments · Fixed by #1909
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@sergelogvinov
Copy link
Contributor

/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 sergelogvinov@c102acb (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:
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label May 31, 2022
@chrigl
Copy link
Contributor

chrigl commented Jun 4, 2022

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.

@jichenjc
Copy link
Contributor

jichenjc commented Jun 6, 2022

+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

@sergelogvinov
Copy link
Contributor Author

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

@mikejoh
Copy link
Contributor

mikejoh commented Jun 16, 2022

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

MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 9, 2024
…m annotation

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900)
To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Use annotation from OpenstackMachine to define region in providerID field.

An empty or undefined annotation permit to be fully backward compatible.
Moreover use annotation permit to manage some cluster with new OCCM provider-id string and other cluster with old format by same CAPO instance.
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 9, 2024
…m annotation

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Use annotation from OpenstackMachine to define region in providerID field.

An empty or undefined annotation permit to be fully backward compatible.
Moreover use annotation permit to manage some cluster with new OCCM provider-id string and other cluster with old format by same CAPO instance.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 9, 2024
…om annotation

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Use annotation from OpenstackMachine to define region in providerID field.

An empty or undefined annotation permit to be fully backward compatible.
Moreover use annotation permit to manage some cluster with new OCCM provider-id string and other cluster with old format by same CAPO instance.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 14, 2024
…from annotation

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Use annotation from OpenstackMachine to define region in providerID field.

An empty or undefined annotation permit to be fully backward compatible.
Moreover use annotation permit to manage some cluster with new OCCM provider-id string and other cluster with old format by same CAPO instance.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 15, 2024
…om crd identityRef

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Add ProviderIDRegion field to OpenStackIdentityReference type to define region name in providerID string.

An empty or undefined ProviderIDRegion field permit to be fully backward compatible.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 15, 2024
…om crd identityRef

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Add Region field to OpenStackIdentityReference type to define region name in providerID string. If specified, it overrides any value in clouds.yaml.

An empty or undefined Region field permit to be fully backward compatible.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 16, 2024
…om crd identityRef

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Add Region field to OpenStackIdentityReference type to define region name in providerID string. If specified, it overrides any value in clouds.yaml.

An empty or undefined Region field permit to be fully backward compatible.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
MatthieuFin added a commit to MatthieuFin/cluster-api-provider-openstack that referenced this issue Oct 17, 2024
…from crd identityRef

To made CAPO compatible with OCCM multi-cloud deployment we need to manage providerID format with region code as introduced [here](kubernetes/cloud-provider-openstack#1900) (`openstack://region/instance_uuid`).
Add Region field to OpenStackIdentityReference type to define region name in providerID string. If specified, it overrides any value in clouds.yaml.

An empty or undefined Region field permit to be fully backward compatible.

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants