aws-quickstart / cdk-eks-blueprints

AWS Quick Start Team
Apache License 2.0
454 stars 205 forks source link

KarpenterAddOn: Can't add taints property #477

Closed go4real closed 2 years ago

go4real commented 2 years ago

Describe the bug

Can't add taints property due to a type error.

Error log message is: Property '0' is missing in type '{ key: string; value: string; effect: string; }[]' but required in type '[{ key: string; value: string; effect: string; }]'.

Expected Behavior

Taints property applied without error.

Current Behavior

Can't add taint property due to the type error

Reproduction Steps

const karpenterAddonProps = {
  taints: [{
    key: "workload",
    value: "service",
    effect: "NoSchedule",  
  }],
  provisionerSpecs: {
    'node.kubernetes.io/instance-type': ['m5.large', 'm5a.large', 'm5.2xlarge'],
    'topology.kubernetes.io/zone': ['us-west-2a', 'us-west-2b'],
    'kubernetes.io/arch': ['amd64'],
    'karpenter.sh/capacity-type': ['spot','on-demand'],
  },
  subnetTags: {
    "aws-cdk:subnet-type": "Private"
  },
  securityGroupTags: {
    "kubernetes.io/cluster/dev-blueprint": "owned",
  },
}

const vpcCniAddOn = new blueprints.VpcCniAddOn("v1.10.1-eksbuild.1");
const defaultKarpenterAddOn = new blueprints.KarpenterAddOn(karpenterAddonProps);
const addOns: Array<blueprints.ClusterAddOn> = [ vpcCniAddOn, defaultKarpenterAddOn ];

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.37.1 (build f15dee0)

EKS Blueprints Version

1.2.0

Node.js Version

v16.16.0

Environment details (OS name and version, etc.)

Cloud9 - AL2

Other information

No response

youngjeong46 commented 2 years ago

@go4real we have a PR in flight that will resolve the issue. I will notify when it's released.

youngjeong46 commented 2 years ago

Addressed per PR #489.