karpenter-provider-aws
karpenter-provider-aws copied to clipboard
[WIP] feat(bootstrap/bottlerocket): compress user data if needed
Fixes #N/A
Description
This adds GZIP compression of Bottlerocket user data, if the resolved user data exceeds the 16KB limit. I've only done the compression if the limit is breached, because any tooling that reads the user data may need to be updated to handle this. Limiting the potential breakage removes the need for a config option IMO.
I've structured this to support additional algorithms down the road (hopefully zstandard: https://github.com/golang/go/issues/62513). Bottlerocket and anything using cloud-init support GZIP today. This PR only adds the behavior for Bottlerocket.
How was this change tested?
Does this change impact docs?
- [ ] Yes, PR includes docs updates
- [ ] Yes, issue opened: #
- [x] No
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Deploy Preview for karpenter-docs-prod ready!
| Name | Link |
|---|---|
| Latest commit | 27352e72f64aa644a8532c13009c4c89f1d34e15 |
| Latest deploy log | https://app.netlify.com/projects/karpenter-docs-prod/deploys/682d62579535e40008abcd5b |
| Deploy Preview | https://deploy-preview-8075--karpenter-docs-prod.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Pull Request Test Coverage Report for Build 15154145570
Details
- 6 of 26 (23.08%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.1%) to 66.734%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| pkg/providers/amifamily/bootstrap/bottlerocket.go | 2 | 4 | 50.0% |
| pkg/providers/amifamily/bootstrap/compress.go | 4 | 22 | 18.18% |
| <!-- | Total: | 6 | 26 |
| Totals | |
|---|---|
| Change from base Build 15151937911: | -0.1% |
| Covered Lines: | 6919 |
| Relevant Lines: | 10368 |
💛 - Coveralls
Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-27352e72f64aa644a8532c13009c4c89f1d34e15.
To install you must login to the ECR repo with an AWS account:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 021119463062.dkr.ecr.us-east-1.amazonaws.com
helm upgrade --install karpenter oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter --version "0-27352e72f64aa644a8532c13009c4c89f1d34e15" --namespace "kube-system" --create-namespace \
--set "settings.clusterName=${CLUSTER_NAME}" \
--set "settings.interruptionQueue=${CLUSTER_NAME}" \
--set controller.resources.requests.cpu=1 \
--set controller.resources.requests.memory=1Gi \
--set controller.resources.limits.cpu=1 \
--set controller.resources.limits.memory=1Gi \
--wait