mirror of https://github.com/rancher/ui.git
Merge pull request #3772 from loganhz/eks-china
[Master] Support EKS cn-northwest-1 and cn-north-1
This commit is contained in:
commit
e8eee13c37
|
|
@ -11,7 +11,7 @@ import { inject as service } from '@ember/service';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import { isEmpty } from '@ember/utils';
|
import { isEmpty } from '@ember/utils';
|
||||||
|
|
||||||
const REGIONS = ['us-east-2', 'us-east-1', 'us-west-2', 'ap-east-1', 'ap-south-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'ca-central-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-north-1', 'me-south-1', 'sa-east-1'];
|
const REGIONS = ['us-east-2', 'us-east-1', 'us-west-2', 'ap-east-1', 'ap-south-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'ca-central-1', 'cn-north-1', 'cn-northwest-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-north-1', 'me-south-1', 'sa-east-1'];
|
||||||
const RANCHER_GROUP = 'rancher-nodes';
|
const RANCHER_GROUP = 'rancher-nodes';
|
||||||
// from https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
|
// from https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
|
||||||
const VERSIONS = ['1.15', '1.14', '1.13']; // sort newest->oldest so we dont have to run any logic to sort like other provider versions
|
const VERSIONS = ['1.15', '1.14', '1.13']; // sort newest->oldest so we dont have to run any logic to sort like other provider versions
|
||||||
|
|
@ -429,6 +429,14 @@ export default Component.extend(ClusterDriver, {
|
||||||
},
|
},
|
||||||
|
|
||||||
listRoles(auth) {
|
listRoles(auth) {
|
||||||
|
// TODO There is no IAM endpoint in cn-northwest-1 region. We need to use cn-north-1 for now. So users chould be able to create EKS cluster in cn-northwest-1.
|
||||||
|
|
||||||
|
const { region } = auth || {};
|
||||||
|
|
||||||
|
if ( region === 'cn-northwest-1' ) {
|
||||||
|
auth.region = 'cn-north-1';
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const IAM = new AWS.IAM(auth);
|
const IAM = new AWS.IAM(auth);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue