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

Add region to providerID magic string.

Open sergelogvinov opened this issue 3 years ago • 13 comments

What this PR does / why we need it:

Change ProviderID to magic sting ${ProviderName}://${REGION}/${instance-id} Which helps to find an instance in a multi-region setup.

It also support old magic string (without region). In this case OCCM works as before (can be used only in the one-zone cluster).

Which issue this PR fixes(if applicable): fixes #1900

Special notes for reviewers:

Release note:

NONE

sergelogvinov avatar Jun 06 '22 06:06 sergelogvinov

Welcome @sergelogvinov!

It looks like this is your first PR to kubernetes/cloud-provider-openstack 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/cloud-provider-openstack has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Jun 06 '22 06:06 k8s-ci-robot

Hi @sergelogvinov. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jun 06 '22 06:06 k8s-ci-robot

/ok-to-test

jichenjc avatar Jun 06 '22 06:06 jichenjc

/lgtm

thanks for the update~

jichenjc avatar Jun 08 '22 00:06 jichenjc

/retest-required

sergelogvinov avatar Jun 15 '22 05:06 sergelogvinov

@chrigl @zetaab maybe you want to take a quick look at this?

jichenjc avatar Jun 16 '22 13:06 jichenjc

this needs release-note. I know that at least we have component that are reading this providerid and using it. So we need to modify that in another applications. I have no idea will this break something in kubernetes itself

zetaab avatar Jun 17 '22 04:06 zetaab

this needs release-note. I know that at least we have component that are reading this providerid and using it. So we need to modify that in another applications. I have no idea will this break something in kubernetes itself

good point , I agree we need give a thorough thought on the backend compatible one possible solution is to expose 2 files (w/ and w/o ) or we have a bool to control this we don't provide any API (leverage cloud provider) so ,need find how to make the contract compatible in such case

jichenjc avatar Jun 20 '22 01:06 jichenjc

Good catch. Let's add the environment like OS_CCM_REGIONAL to allow OCCM to add the region to the ProviderID string. By default, it will be false. OCCM will support both type of string. But if OS_CCM_REGIONAL=false, OCCM creates the ProviderID without region code.

And in the future, we'll switch it to true.

sergelogvinov avatar Jun 24 '22 11:06 sergelogvinov

this needs release-note. I know that at least we have component that are reading this providerid and using it. So we need to modify that in another applications. I have no idea will this break something in kubernetes itself

Finally, I found that Ingress and OCCM use ProdiverID sting. I've added:

  • support for both sting types.
  • optional environment to switch on/off region code in ProviderID sting.

sergelogvinov avatar Jun 24 '22 12:06 sergelogvinov

@jichenjc @zetaab Hi. I've updated the documentation and this feature can be activated by the environment value.

sergelogvinov avatar Aug 22 '22 13:08 sergelogvinov

/lgtm

jichenjc avatar Aug 24 '22 00:08 jichenjc

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zetaab

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Aug 25 '22 04:08 k8s-ci-robot