dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Use API to get EKS region and instance data instead of hardcoding

Open mantis-toboggan-md opened this issue 3 years ago • 7 comments

The UI has a fair bit of hardcoded amazon data, see: https://github.com/rancher/ui/blob/master/lib/shared/addon/utils/amazon.js In particular we are manually keeping track of which EKS versions to show. We should investigate whether or not there is an API we can use for EKS versions and possibly region/instance data as well.

mantis-toboggan-md avatar Oct 26 '22 19:10 mantis-toboggan-md

Someone found a way to do it indirectly https://stackoverflow.com/a/71448603/5370501

catherineluse avatar Oct 26 '22 22:10 catherineluse

There is already an issue about replacing the hardcoded EKS versions https://github.com/rancher/dashboard/issues/4401, so I'm editing the scope of the issue to region and instance data.

Related backend issue for EKS versions is here https://github.com/rancher/rancher/issues/33766

catherineluse avatar Nov 04 '22 20:11 catherineluse

Also for reference, there is a SUSE project https://github.com/SUSE-Enceladus/aws-regions - this uses the AWS CLI project on GitHub - https://github.com/boto/botocore - looks like it maintains up to date data that could be used: https://github.com/boto/botocore/blob/develop/botocore/data/endpoints.json

nwmac avatar Jan 17 '23 08:01 nwmac

For 2.7.next2, we should maybe spend size/5 on this so we need to estimate the effort here; if it's larger, then we push it out. But this would help with a regular series of requests we get.

gaktive avatar Feb 01 '23 17:02 gaktive

Need to also consider EC2 regions and regions list used when supplying credentials

This covers old and new UIs.

Old UI REGIONS - Used for EC2 AND credentials (used by both ec2 and eks) EKS_REGIONS - Used for eks things

New UI TBD

richard-cox avatar Jun 27 '23 13:06 richard-cox

@mantis-toboggan-md when we port EKS, is this doable in Vue? or is that even possible? We could potentially close this if this is also covered with existing migration plans.

gaktive avatar Aug 03 '23 14:08 gaktive

@gaktive I think it would make sense to tackle this at the same time as the EKS migration, but I don't think this enhancement is implicit in that plan - it's worth calling out directly. It wouldn't be any harder in Vue than Ember.

mantis-toboggan-md avatar Aug 03 '23 15:08 mantis-toboggan-md

Tests pass on v2.9-16190ecee0aa3fb4aa570aa0fc932a36d9dcd082-head

IsaSih avatar Jun 18 '24 12:06 IsaSih