Non-idiomatic use of Map throughout
Map types aren't idiomatic for Typescript. Where types like Map<String,T> are used, they should be replaced with { [key:string]: T }.
For example, this code looks quite clumsy:
fargateProfiles: new Map([
['karpenter', { selectors: [{ namespace: 'karpenter'}]}]
]),
vs. the much cleaner (and idiomatic) looking:
fargateProfiles: {
karpenter: {
selectors: [{ namespace: 'karpenter'}]
}
},
See index signatures for additional information.
Thank you, @otterley. I see the API usability issue. I spotted this a bit late and this feature is part of the stable API.
We are using the record style map approach in the new GenericClusterProvider here.
What I can do to address the usability and preserve backwards compatibility is simplify construction of the fargate profiles for the users by adding convenience methods.
Have you considered the possibility of using union types to fix the problem without breaking existing code?
@otterley I will take a look.
@otterley Closing this issue because of your PR.