-
Notifications
You must be signed in to change notification settings - Fork 904
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
feat: Add tenancy option dedicated on LaunchTemplate #6360
Changes from all commits
1e5fd43
6866d60
46a2bd8
5f9bd01
ae90694
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,16 @@ type EC2NodeClassSpec struct { | |
// +kubebuilder:default={"httpEndpoint":"enabled","httpProtocolIPv6":"disabled","httpPutResponseHopLimit":2,"httpTokens":"required"} | ||
// +optional | ||
MetadataOptions *MetadataOptions `json:"metadataOptions,omitempty"` | ||
// Tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you able to workaround this limitation by having the VPC tenancy be dedicated? Or do you need a mix of dedicated and non-dedicated instances in the VPC? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typically, dedicated tenancy has less available instance capacity in a region than default tenancy. This is a case where default and tenancy was mixed and used within a VPC. |
||
// | ||
// If not set, Tenancy will be set to default. | ||
// Currently, Karpenter only support default and dedicated option. | ||
// For more information, | ||
// See the AWS::EC2::LaunchTemplate Placement Document. | ||
// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-placement.html | ||
// +kubebuilder:validation:Enum:={default,dedicated} | ||
// +optional | ||
Tenancy *string `json:"tenancy,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we even need default or can we just assume that not specifying this option assumes that you are using "shared"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If not specified, tenancy is "default (shared)". |
||
// Context is a Reserved field in EC2 APIs | ||
// https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet.html | ||
// +optional | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
What are your thoughts about doing something smarter here? Can Karpenter be aware of your dedicated instances and just use them? What happens if you run out of dedicated instances for the EC2NodeClass to launch?
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.
There is placement.tenancy information in the response of ec2 launch instance.
https://docs.aws.amazon.com/ko_kr/AWSEC2/latest/APIReference/API_Placement.html
Using this, We can enter tenancy information in nodeclass status, but I don't know if any other method can be implemented other than logging that the dedicated instance of the currently requested Instance requirement is Insufficient.