Skip to content

(karpenter addon): Forced override and non declared 'namespace' var in karpenterAddonProps #1132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
antmakedev opened this issue Apr 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@antmakedev
Copy link

antmakedev commented Apr 14, 2025

Describe the bug

karpenterAddonProps requires a 'namespace' parameter to successfully create controller addon role. This parameter is not included in the addon props and therefore silently fails. When it fails it does not create a namespace or the controller role required Karpenter.

https://github.com/aws-quickstart/cdk-eks-blueprints/blob/main/lib/addons/karpenter/index.ts#L468

This was implemented here - commit f337610

Expected Behavior

When not defining a namespace, expect an assertion error thrown or sensible default (e.g karpenter) namespace to be created.

Also expect namespace to be defined within the karpenterAddonProps.

Current Behavior

Defining a basic karpenterAddOn does not create a namespace, karpenter controller or controller role.

If you then define an undocumented namespace var it does create a namespace and controller role (as expected).

This required tracking down the variable needed here - https://github.com/aws-quickstart/cdk-eks-blueprints/blob/main/lib/addons/karpenter/index.ts#L468

    const test: KarpenterAddOnProps = {
      namespace: "karpenter",
    }

    this.blueprintAddons = [
      new KarpenterAddOn(test)
    ];

Reproduction Steps

    this.blueprintAddons = [
      new KarpenterAddOn()
    ];

Possible Solution

Additional Information/Context

No response

CDK CLI Version

2.1007.0

EKS Blueprints Version

No response

Node.js Version

v22.11.0

Environment details (OS name and version, etc.)

Github codespace

Other information

No response

@antmakedev antmakedev added the bug Something isn't working label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant