address review comments
Signed-off-by: Jonah Back <jonah@jonahback.com>
This commit is contained in:
@@ -50,7 +50,7 @@ export class AwsEKSClusterProcessor implements CatalogProcessor {
|
||||
normalizeName(name: string): string {
|
||||
return name
|
||||
.trim()
|
||||
.toLocaleLowerCase()
|
||||
.toLocaleLowerCase('en-US')
|
||||
.replace(/[^a-zA-Z0-9\-]/g, '-');
|
||||
}
|
||||
|
||||
@@ -66,6 +66,12 @@ export class AwsEKSClusterProcessor implements CatalogProcessor {
|
||||
// location target is of format "account-id/region"
|
||||
const [accountId, region] = location.target.split('/');
|
||||
|
||||
if (!accountId || !region) {
|
||||
throw new Error(
|
||||
'AWS EKS location specified without account or region information',
|
||||
);
|
||||
}
|
||||
|
||||
let credentials: Credentials | undefined;
|
||||
|
||||
if (this.credentialsFactory) {
|
||||
|
||||
Reference in New Issue
Block a user