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

chore: update helm version #1534

Open
wants to merge 2 commits into
base: kubectl-v20/main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This module bundles the
`ASSET_FILE` and `LAYER_SOURCE_DIR` that can be consumed via the cdk `Asset`
construct.

> - Helm Version: 3.8.1
> - Helm Version: 3.17.0
> - Kubectl Version: 1.20.0
>

Expand Down
5 changes: 4 additions & 1 deletion layer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ FROM public.ecr.aws/lambda/provided:latest

# KUBECTL_VERSION should not be changed at the moment, see https://github.com/aws/aws-cdk/issues/15736
# Version 1.21.0 is not compatible with version 1.20 (and lower) of the server.
# Setting helm version to 3.17.0 to mitigate https://security.snyk.io/vuln/SNYK-CHAINGUARDLATEST-HELM-7219926
# It is not guaranteed to work with the kubectl version. However this layer version is outdated so it doesn't really matter.
# This needs to be fixed because the outdated version is bundled into cdk dependency.
ARG KUBECTL_VERSION=1.20.0
ARG HELM_VERSION=3.8.1
ARG HELM_VERSION=3.17.0

Choose a reason for hiding this comment

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

we're using this layer in aws-cdk-lib if I'm not wrong, any change in here can lead to breaking change for the customers as well as it being used here in CDK.
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/lambda-layer-kubectl/lib/kubectl-layer.ts#L1. Though, EKS natively doesn't support this kubectl version, not sure if we still want to keep it to older version in main lib https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html.

Copy link
Author

@xazhao xazhao Jan 17, 2025

Choose a reason for hiding this comment

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

Yes this layer is used in aws-cdk-lib and is outdated.
There are 3 ways to resolve it:

  1. make kubectlLayer required from optional
  2. update kubectlLayer default version
  3. update helm version

All of them are breaking changes. 3) is the solution has least impact. Since this layer is not supported natively by EKS, the change impact is minimal.

Copy link
Author

Choose a reason for hiding this comment

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

Similar with change as this PR #623

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd argue (1) has the least impact. Yes, it will break builds. But at least it will break them transparently. Both (2) and (3) might or might not break a customer depending on the exact circumstances. However if it does, the failure will be much less transparent and a few steps removed. (1) has a guarantee to have zero impact on deployed resources. With (2) & (3) we have the potential to cause an outage to a customer.


USER root
RUN mkdir -p /opt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "38.0.1",
"files": {
"e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310": {
"4a9eead4730e5ced9df7c65a4ead6796d8a12930aea73afa6484da8f982f9cf5": {
"source": {
"path": "asset.e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip",
"path": "asset.4a9eead4730e5ced9df7c65a4ead6796d8a12930aea73afa6484da8f982f9cf5.zip",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip",
"objectKey": "4a9eead4730e5ced9df7c65a4ead6796d8a12930aea73afa6484da8f982f9cf5.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down Expand Up @@ -40,15 +40,15 @@
}
}
},
"f556204d1443466ffdd864c68846e169b2ab550aa30349dc069545bae8f31db2": {
"0580c2d6bc62ee96aa188c0098eebf72ba5326065971183c7f944019c82c6094": {
"source": {
"path": "lambda-layer-kubectl-integ-stack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "f556204d1443466ffdd864c68846e169b2ab550aa30349dc069545bae8f31db2.json",
"objectKey": "0580c2d6bc62ee96aa188c0098eebf72ba5326065971183c7f944019c82c6094.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip"
"S3Key": "4a9eead4730e5ced9df7c65a4ead6796d8a12930aea73afa6484da8f982f9cf5.zip"
},
"Description": "/opt/kubectl/kubectl and /opt/helm/helm"
}
Expand Down
Loading