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: Update Karpenter addon to support v0.32.1/v1beta1 #285

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

bryantbiggs
Copy link
Contributor

What does this PR do?

  • Update Karpenter addon to support v0.32.1/v1beta1

Motivation

  • Resolves #

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I ran pre-commit run -a with this PR

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

Copy link
Contributor

@askulkarni2 askulkarni2 left a comment

Choose a reason for hiding this comment

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

🚀

@bryantbiggs
Copy link
Contributor Author

I need to dig in a bit more, was getting some segfault errors like this terraform-aws-modules/terraform-aws-eks#2800 (comment)

@bryantbiggs bryantbiggs mentioned this pull request Nov 1, 2023
3 tasks
@gytis-ivaskevicius
Copy link

I am not sure if you noticed, but FYI: karpenter chart has changed a lot between versions. I have not looked into exact changes but it is likely that the upgrade requires quite a bit more work from the values side

@bryantbiggs bryantbiggs marked this pull request as ready for review November 1, 2023 16:02
@bryantbiggs bryantbiggs requested a review from a team as a code owner November 1, 2023 16:02
@bryantbiggs bryantbiggs merged commit 231e6dd into main Nov 1, 2023
5 checks passed
@bryantbiggs bryantbiggs deleted the feat/update-karpenter branch November 1, 2023 16:05
@momelod
Copy link

momelod commented Nov 4, 2023

This update introduced a new bug. Karpter pods error with:
panic: validating settings, missing field(s): aws.clusterName, aws.clusterName is required

Reverting the module version to 1.9.0 corrects the error. Terraform plan shows the following changes it wants to make between versions and its putting the cluster_name in settings.clusterName instead of where it's expected at settings.aws.clusterName

  # module.kubernetes_addons.module.karpenter.helm_release.this[0] will be updated in-place
  ~ resource "helm_release" "this" {
        id                         = "karpenter"
      ~ metadata                   = [
          - {
              - app_version = "0.30.0"
              - chart       = "karpenter"
              - name        = "karpenter"
              - namespace   = "karpenter"
              - revision    = 2
              - values      = jsonencode(
                    {
                      - serviceAccount = {
                          - annotations = {
                              - "eks.amazonaws.com/role-arn" = "arn:aws:iam::999999999:role/karpenter-20231104123456789b"
                            }
                          - name        = "karpenter"
                        }
                      - settings       = {
                          - aws = {
                              - clusterEndpoint        = "https://ABCDEFGHIJKLMNOPQRSTUVWXYZ.gr7.ca-central-1.eks.amazonaws.com"
                              - clusterName            = "my-superawesomecluser"
                              - defaultInstanceProfile = "karpenter-my-superawesomecluser-20231104170235461500000001"
                              - interruptionQueueName  = "karpenter-my-superawesomecluser"
                            }
                        }
                    }
                )
              - version     = "v0.30.0"
            },
        ] -> (known after apply)
        name                       = "karpenter"
      ~ version                    = "v0.30.0" -> "v0.32.1"
        # (27 unchanged attributes hidden)

      - set {
          - name  = "settings.aws.clusterEndpoint" -> null
          - value = "https://ABCDEFGHIJKLMNOPQRSTUVWXYZ.gr7.ca-central-1.eks.amazonaws.com" -> null
        }
      - set {
          - name  = "settings.aws.clusterName" -> null
          - value = "my-superawesomecluser" -> null
        }
      - set {
          - name  = "settings.aws.defaultInstanceProfile" -> null
          - value = "karpenter-my-superawesomecluser-20231104170235461500000001" -> null
        }
      - set {
          - name  = "settings.aws.interruptionQueueName" -> null
          - value = "karpenter-my-superawesomecluser" -> null
        }
      + set {
          + name  = "settings.clusterEndpoint"
          + value = "https://ABCDEFGHIJKLMNOPQRSTUVWXYZ.gr7.ca-central-1.eks.amazonaws.com"
        }
      + set {
          + name  = "settings.clusterName"
          + value = "my-superawesomecluser"
        }
      + set {
          + name  = "settings.interruptionQueueName"
          + value = "karpenter-my-superawesomecluser"
        }

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 2 to change, 1 to destroy.

@bryantbiggs
Copy link
Contributor Author

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.

4 participants