-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
replace hard coded aws region checks with aws sdk calls #11119
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
Hi @guydog28. 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 Once the patch is verified, the new status will be reflected by the 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. |
/check-cla |
I signed it |
/check-cla |
1 similar comment
/check-cla |
I signed it |
I didn't want to muddy up this pull request, but additionally there are partitions whose regions are not represented in upup/pkg/fi/cloud.go (zonesToCloud). Why not generate this list from the aws-sdk-go? This way as new regions are reported, if the sdk continues to be updated, the new regions will be available to kops users. |
/check-cla |
2 similar comments
/check-cla |
/check-cla |
Thanks @guydog28. |
/test pull-kops-e2e-cni-cilium |
@guydog28 Please squash and make the commit message shorter. Will make it easier to track in the future. |
Regarding If we can figure out a lightweight way to do that for any providers that support providing this info via API, I would support that effort 👍🏻 That mapping only exists because we support inferring the cloud provider from the provided --zones. I would strongly prefer that we just make --cloud required and drop this map entirely, but I'm not sure how others feel. |
I agree with this. |
@hakman @rifelpet If it just to make a guess, why not remove the map altogether and use a few regexs in the Just test it against each regex to guess the provider instead of that big list? |
Additionally, I took the old hardcoded zones and used them to create a unit test to test the regex I created to be sure this method still returns the same results. |
@guydog28 Let's keep the 2 things separate. Please create a separate PR for the zones thing and we can discuss there. |
Yes I agree |
@hakman ok I pulled out the cloud.go into its own PR, and added tests for the changes. |
Could you also update the commit message and PR title to match the content? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman 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 |
…-upstream-release-1.20 Automated cherry pick of #11119: replace hard coded aws region checks with aws sdk calls
…-upstream-release-1.19 Automated cherry pick of #11119: replace hard coded aws region checks with aws sdk calls
future proof AWS endpoint and IAM Prefix generation to handle new AWS Partitions and future new ones. Offload to AWS SDK