Skip to content

Conversation

@zjaco13
Copy link
Contributor

@zjaco13 zjaco13 commented Dec 19, 2025

Issue #, if available:
#1216
Description of changes:
Adds a new module for creating EKS Capabilities as part of the framework. Available to customers as a part of EKS Builder

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a few high level comments. Overall, I like the structure that you proposed, it is consistent with the approaches currently applied. There are some trade-offs here and there that I brought up.

import { CfnCapability } from "aws-cdk-lib/aws-eks";
import { ClusterInfo } from "./types";

export declare interface ClusterCapability {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add some jsdoc for the interface and each public method - it is more relevant for anything in the contract.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add capability to the docs/core-concepts.md since it is in the SPI

this.clusterInfo.addProvisionedAddOn(addOnKeys[index], construct);
});

if (blueprintProps.capabilities != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about this specific placement: do you envision that capabilities must be provisioned BEFORE the addons and teams are applied? If yes, what provisions to you plan to ensure this?

For example, one approach could be to move the into the cluster provider (like V2). Then cluster provider organizes the dependencies in a particular way to ensure that by the time addons are applied the capabilities are there.

Another approach is to have it the way it is now - consistent with how addons are implemented. However, some dependency management logic can apply to make sure addons follow capabilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think it makes sense that capabilities should be deployed first. It shouldn't really matter at the moment, but if we want to be able to support gitops approach to addons with the argocd capability we might have to make it more direct

import { ClusterInfo } from "./types";

export declare interface ClusterCapability {
create(clusterInfo: ClusterInfo): CfnCapability
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have L2 support for capabilities yet, but is there any reason why we would expose specifically CfnCapability here vs let's something generic like IConstruct? Do you envision that customers will need to know anything about the internal structure of this returned object other than - it is a construct and I can depend on it?
Making it more generic can allow easier support for capabilities in the future if L2 support comes along. it is a tradeoff, but as a rule - do not expose more than necessary about internal approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought process was that any capability will always return a Cfn Capability, otherwise it could basically be instantiated as an addon


if (blueprintProps.capabilities != null) {
for (let capability of blueprintProps.capabilities) {
capability.create(this.clusterInfo);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with addons we keep track of them in the cluster info. If I want to check whether a particular capability is there - what is my approach from within an addon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do this, this way I can also ensure that addons + capabilities that do the same thing don't accidentally get deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants