-
Notifications
You must be signed in to change notification settings - Fork 221
Add EKS Capabilities feature #1219
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
base: main
Are you sure you want to change the base?
Conversation
shapirov103
left a comment
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
lib/spi/capability-contracts.ts
Outdated
| import { ClusterInfo } from "./types"; | ||
|
|
||
| export declare interface ClusterCapability { | ||
| create(clusterInfo: ClusterInfo): CfnCapability |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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.