Skip to content
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

Add support for Bottlerocket on Neuron instance types #7722

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vigh-m
Copy link

@vigh-m vigh-m commented Feb 10, 2025

Fixes #7596

Description
This changes allows karpenter to launch Neuron instances (inf, trn instance types) using the Bottlerocket AMI.

How was this change tested?

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vigh-m vigh-m requested a review from a team as a code owner February 10, 2025 20:52
@vigh-m vigh-m requested a review from tzneal February 10, 2025 20:52
Copy link

netlify bot commented Feb 10, 2025

Deploy Preview for karpenter-docs-prod ready!

Name Link
🔨 Latest commit ebe2ee0
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/67ae8365c316a100086e0872
😎 Deploy Preview https://deploy-preview-7722--karpenter-docs-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@vigh-m vigh-m changed the title Enable neuron Add support for Bottlerocket on Neuron instance types Feb 10, 2025
@@ -1353,6 +1353,20 @@ cluster-name = 'cluster'
'memory.available' = '12%%'
```

#### Device ownership in Bottlerocket

Bottlerocket v1.30.0+ supports device ownership using the security context provided in the Kubernetes specfile. To enable this, you will need the following user-data configurations:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the security context coming from the Pod spec? Mind linking out to that here?

Copy link
Author

Choose a reason for hiding this comment

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

Ack. Updated

```toml
[settings]
[settings.kubernetes]
device-ownership-from-security-context = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to update our merge semantic for our settings if we are going to support this new setting here?

Copy link
Author

Choose a reason for hiding this comment

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

Assuming the merge logic is agnostic to the toml key being provided, then no.

I imagine it would be able, to support arbitrary keys under Bottlerocket sysctl settings

Copy link
Contributor

Choose a reason for hiding this comment

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

We map to settings.kubernetes via a struct in pkg/providers/amifamily/bootstrap/bottlerocketsettings.go:46. Can we add this to that struct please?

@vigh-m
Copy link
Author

vigh-m commented Feb 13, 2025

⬆️ Pushed updates following comments

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13319263932

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 65.215%

Totals Coverage Status
Change from base Build 13318062853: 0.0%
Covered Lines: 5977
Relevant Lines: 9165

💛 - Coveralls

@@ -44,7 +44,7 @@ func (b Bottlerocket) DescribeImageQuery(ctx context.Context, ssmProvider ssm.Pr
trimmedAMIVersion := strings.TrimLeft(amiVersion, "v")
ids := map[string][]Variant{}
for path, variants := range map[string][]Variant{
fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s/x86_64/%s/image_id", k8sVersion, trimmedAMIVersion): {VariantStandard},
fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s/x86_64/%s/image_id", k8sVersion, trimmedAMIVersion): {VariantStandard, VariantNeuron},
fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s/arm64/%s/image_id", k8sVersion, trimmedAMIVersion): {VariantStandard},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is arm not supported?

Copy link
Author

Choose a reason for hiding this comment

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

Nope. Neuron instances only support x86 architecture

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.

[Feature] Enable launching Bottlerocket AMIs on AWS Neuron Instances
4 participants