Add region to providerID magic string.
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
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:
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.
/ok-to-test
/lgtm
thanks for the update~
/retest-required
@chrigl @zetaab maybe you want to take a quick look at this?
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
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
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.
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.
@jichenjc @zetaab Hi. I've updated the documentation and this feature can be activated by the environment value.
/lgtm
[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
- ~~OWNERS~~ [zetaab]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment