-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Support karpenter-crd
Helm Chart and Fix Node Interruption Handling
#868
Merged
Merged
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d1ecd5f
added karpenter-crd chart support, added back docs for node interrupt…
milldr c05bf0e
update readme for consistency
milldr 60a3f5c
removed unnecessary service account for karpenter-crd
milldr 9b5dc51
Apply suggestions from code review
milldr 81e4536
create namespace with separate resource
milldr 1aa1bdf
changelog for karpenter crd
milldr 0a3ff15
changelog for karpenter crd
milldr 716c3b1
corrected atmos resource in changelog
milldr c8d41ed
depends_on and moved block for karpenter
milldr 954bb7d
updated changelog for moved block
milldr 3f723da
added all scenarios to the changelog
milldr 590a193
Merge branch 'main' into support-karpenter-crd
milldr d77b2cf
updated moved block for correct resource names and comment
milldr d2a4521
handle unknown ARN on creation for interruption queue policy
milldr eb65e88
improved pattern for pulling arn
milldr 518f2c4
Merge branch 'main' into support-karpenter-crd
milldr f62bc51
Apply suggestions from code review
milldr 892f5e9
pre-commit fixes
cloudpossebot 205d0e4
Merge branch 'main' into support-karpenter-crd
milldr a10f4ff
pr comments
milldr 54e04af
Merge branch 'support-karpenter-crd' of github.com:cloudposse/terrafo…
milldr bc0fbe2
Merge branch 'main' into support-karpenter-crd
milldr 5ae3698
Fix typo, add cautions
Nuru a4da3e3
Merge branch 'main' into support-karpenter-crd
Nuru de75c39
Update version number
Nuru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## Components PR [#868](https://github.com/cloudposse/terraform-aws-components/pull/868) | ||
|
||
The `karpenter-crd` helm chart can now be installed alongside the `karpenter` helm chart to automatically manage the lifecycle of Karpenter CRDs. However since this chart must be installed before the `karpenter` helm chart, the Kubernetes namespace must be available before either chart is deployed. Furthermore, this namespace should persist whether or not the `karpenter-crd` chart is deployed, so it should not be installed with that given `helm-release` resource. Therefore, we've moved namespace creation to a separate resource that runs before both charts. Terraform will handle that namespace state migration with the `moved` block. | ||
|
||
There are several scenarios that may or may not require additional steps. Please review the following scenarios and follow the steps for your given requirements. | ||
|
||
### Upgrading an existing `eks/karpenter` deployment without changes | ||
|
||
If you currently have `eks/karpenter` deployed to an EKS cluster and have upgraded to this version of the component, no changes are required. `var.crd_chart_enabled` will default to `false`. | ||
|
||
### Upgrading an existing `eks/karpenter` deployment and deploying the `karpenter-crd` chart | ||
|
||
If you currently have `eks/karpenter` deployed to an EKS cluster, have upgraded to this version of the component, do not currently have the `karpenter-crd` chart installed, and want to now deploy the `karpenter-crd` helm chart, a few addtional steps are required! | ||
|
||
First, set `var.crd_chart_enabled` to `true`. | ||
|
||
Next, update the installed Karpenter CRDs in order for Helm to automatically take over their management when the `karpenter-crd` chart is deployed. We have included a script to run that upgrade. Run the `./karpenter-crd-upgrade` script or run the following commands on the given cluster before deploying the chart. Please note that this script or commands will only need to be run on first use of the CRD chart. | ||
|
||
```bash | ||
kubectl label crd awsnodetemplates.karpenter.k8s.aws provisioners.karpenter.sh app.kubernetes.io/managed-by=Helm --overwrite | ||
kubectl annotate crd awsnodetemplates.karpenter.k8s.aws provisioners.karpenter.sh meta.helm.sh/release-name=karpenter-crd --overwrite | ||
kubectl annotate crd awsnodetemplates.karpenter.k8s.aws provisioners.karpenter.sh meta.helm.sh/release-namespace=karpenter --overwrite | ||
``` | ||
|
||
:::info | ||
|
||
Previously the `karpenter-crd-upgrade` script included deploying the `karpenter-crd` chart. Now that this chart is moved to Terraform, that helm deployment is no longer necessary. | ||
|
||
For reference, the `karpenter-crd` chart can be installed with helm with the following: | ||
```bash | ||
helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-crd --version "$VERSION" --namespace karpenter | ||
``` | ||
|
||
::: | ||
|
||
Now that the CRDs are upgraded, the component is ready to be applied. Apply the `eks/karpenter` component and then apply `eks/karpenter-provisioner`. | ||
|
||
### Upgrading an existing `eks/karpenter` deployment where the `karpenter-crd` chart is already deployed | ||
|
||
If you currently have `eks/karpenter` deployed to an EKS cluster, have upgraded to this version of the component, and already have the `karpenter-crd` chart installed, simply set `var.crd_chart_enabled` to `true` and redeploy Terraform to have Terraform manage the helm release for `karpenter-crd`. | ||
|
||
### Net new deployments | ||
|
||
If you are initially deploying `eks/karpenter`, no changes are required, but we recommend installing the CRD chart. Set `var.crd_chart_enabled` to `true` and continue with deployment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Are you sure you don't have to import the CRD helm chart?