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

feat: AL2023 AMI family support #5604

Merged
merged 16 commits into from
Feb 28, 2024
Merged

feat: AL2023 AMI family support #5604

merged 16 commits into from
Feb 28, 2024

Conversation

jmdeal
Copy link
Contributor

@jmdeal jmdeal commented Feb 5, 2024

Fixes #3382

Description
This PR adds support for the AL2023 AMI Family. While it is currently not available, it has been developed and tested against the latest version of the amazon-eks-ami al2023 branch.

Example Usage:

apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
metadata:
  name: default
spec:
  amiFamily: AL2023
  userData: |
    MIME-Version: 1.0
    Content-Type: multipart/mixed; boundary="//"

    --//
    Content-Type: application/node.eks.aws

    apiVersion: node.eks.aws/v1alpha1
    kind: NodeConfig
    spec:
      kubelet:
        config:
          maxPods: 42
    --//
    Content-Type: text/x-shellscript; charset="us-ascii"

    #!/bin/bash
    echo "Hello AL2023!"
    --//
  role: $KARPENTER_NODE_ROLE
  subnetSelectorTerms:
    - tags:
        karpenter.sh/discovery: $CLUSTER_NAME
  securityGroupSelectorTerms:
    - tags:
        karpenter.sh/discovery: $CLUSTER_NAME

How was this change tested?

  • manually
  • make test
  • make e2etests

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.

@jmdeal jmdeal requested a review from a team as a code owner February 5, 2024 23:55
@jmdeal jmdeal requested a review from njtran February 5, 2024 23:55
Copy link

netlify bot commented Feb 5, 2024

Deploy Preview for karpenter-docs-prod ready!

Name Link
🔨 Latest commit 7382117
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/65df99e7a40ccb00077d3ee8
😎 Deploy Preview https://deploy-preview-5604--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.

@jmdeal jmdeal force-pushed the al2023-support branch 2 times, most recently from 907d990 to 2f76ddb Compare February 6, 2024 00:44
@coveralls
Copy link

coveralls commented Feb 6, 2024

Pull Request Test Coverage Report for Build 8086791095

Details

  • -41 of 243 (83.13%) changed or added relevant lines in 9 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 82.626%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/operator/operator.go 0 1 0.0%
pkg/controllers/nodeclass/controller.go 2 4 50.0%
pkg/providers/launchtemplate/launchtemplate.go 19 24 79.17%
pkg/providers/amifamily/bootstrap/nodeadm.go 81 97 83.51%
pkg/providers/amifamily/bootstrap/mime/mime.go 43 60 71.67%
Files with Coverage Reduction New Missed Lines %
pkg/providers/amifamily/ami.go 1 90.32%
Totals Coverage Status
Change from base Build 8085550163: 0.03%
Covered Lines: 5255
Relevant Lines: 6360

💛 - Coveralls

@jmdeal jmdeal force-pushed the al2023-support branch 11 times, most recently from 2f81c5e to 0981cd3 Compare February 10, 2024 00:46
Copy link
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

Nice work! Excited to see us get AL2023 support in!

pkg/operator/operator.go Outdated Show resolved Hide resolved
pkg/operator/options/options.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/al2023.go Show resolved Hide resolved
pkg/providers/launchtemplate/launchtemplate.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/utils/mime.go Outdated Show resolved Hide resolved
pkg/utils/mime.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/launchtemplate.go Outdated Show resolved Hide resolved
pkg/operator/operator.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Show resolved Hide resolved
pkg/utils/mime.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

Nice work 🎉 Another round

pkg/utils/mime.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/bootstrap/nodeadm.go Outdated Show resolved Hide resolved
pkg/utils/mime.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/launchtemplate.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/launchtemplate.go Outdated Show resolved Hide resolved
pkg/operator/operator.go Outdated Show resolved Hide resolved
website/content/en/preview/concepts/nodeclasses.md Outdated Show resolved Hide resolved
website/content/en/preview/concepts/nodeclasses.md Outdated Show resolved Hide resolved
Copy link
Contributor

@engedaam engedaam left a comment

Choose a reason for hiding this comment

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

Realy like how this is coming along!

pkg/providers/amifamily/al2023.go Show resolved Hide resolved
pkg/operator/options/options.go Outdated Show resolved Hide resolved
pkg/operator/operator.go Outdated Show resolved Hide resolved
pkg/operator/operator.go Outdated Show resolved Hide resolved
website/content/en/preview/concepts/nodeclasses.md Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Show resolved Hide resolved
@jmdeal jmdeal added the blocked Unable to make progress due to some dependency label Feb 13, 2024
@jmdeal jmdeal closed this Feb 13, 2024
@jmdeal jmdeal reopened this Feb 13, 2024
@jmdeal jmdeal force-pushed the al2023-support branch 4 times, most recently from a15473e to 0db00e9 Compare February 14, 2024 04:46
@jmdeal jmdeal force-pushed the al2023-support branch 2 times, most recently from 8549cd4 to c439ea5 Compare February 28, 2024 15:30
pkg/providers/amifamily/bootstrap/nodeadm.go Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/launchtemplate.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/al2023.go Outdated Show resolved Hide resolved
jonathan-innis
jonathan-innis previously approved these changes Feb 28, 2024
Copy link
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Nice work!

pkg/providers/launchtemplate/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Nice work!

@jmdeal jmdeal enabled auto-merge (squash) February 28, 2024 20:42
@jmdeal jmdeal merged commit eb53e9b into aws:main Feb 28, 2024
17 checks passed
@jmdeal jmdeal deleted the al2023-support branch May 9, 2024 23:48
@jmdeal jmdeal restored the al2023-support branch May 9, 2024 23:48
@jmdeal jmdeal deleted the al2023-support branch August 14, 2024 22:39
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.

Support Amazon Linux 2023 (AL2023 previously AL2022) for AWS Node Templates
5 participants