-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(lambda-layer-kubectl): update kubectl layer to use v1.22.0 #24064
Conversation
I think this is the solution you are looking for: But I realize our documentation might not be clear about this. 🤔 |
Thanks. But, that library cannot be used with cdk v1.
|
Now that the PR is out of draft status, please review it. |
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.
Apologies for the delayed response @daisuke-yoshimoto
I don't think we will be able to accept this change:
AWS CDK v1 is no longer receiving higher-level “L2” construct updates for new or existing services. It will continue receiving updates for new and updated resource level “L1” constructs, critical bug fixes, and security updates only. We recommend you upgrade your applications to the new major version of CDK – AWS CDK version 2 (v2), which continues receiving new features and bug fixes.
I also think this might be a breaking change with a risk of data loss. Checking with the EKS experts on our team.
I don't understand why it's a risk. Next week EKS will no longer have Kubernetes 1.20 and 1.21 clusters. I understand that you won't be making any major changes to CDK v1 anymore, but this is a pressing issue that needs to be addressed, so please include it.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Users on EKS 1.19 won't be able to use this version of kubectl. |
Check Amazon EKS Kubernetes release calendar carefully. 1.19 has been out of support for over a year now, so 1.19 clusters don't exist on EKS.
|
The fix here is to move to v2. Is there anything major blocking you from being able to do so? As you noted, we put v1 into maintenance mode on July 1st of 2022 so we no longer backport updates unless they are security updates. |
I will also send a PR to v2, so could you please merge this fix first? If you don't include this fix, users running EKS with cdk v1 will be in a lot of trouble. Users will not be able to update the manifest via cdk. I think this is a very serious bug. Also, the documentation also says that critical bugs will be fixed until June 1, 2023. Please, can you accept the modification? I think that users who are operating with cdk v1 are very troubled. |
There is no need to create a PR for v2. We have created a more flexible system for this, see the link I've posted earlier: https://www.npmjs.com/package/@aws-cdk/lambda-layer-kubectl-v22 |
However, cdk v2 also has kubectl 1.20 set by default.
I think it is necessary to modify the default setting to |
Unfortunately changing the default version for the layer is a breaking change. We could introduce this behind a feature flag, but this would require us to depend on multiple layer packages, which isn't ideal either. I absolutely agree that the user experience isn't great here, but neither is breaking people. In hindsight, the Not sure I currently see a way out of this. Maybe we could do some stuff with the new Cluster(scope, id, {
version: ClusterVersion.for(KubernetesVersion.V1_24, new KubectlV24Layer(this, 'kubectl'))
};
class ClusterVersion implements IKubernetesVersion {
static public for(version: KubernetesVersion, kubectlLayer: ILayerVersion {
}
} And |
Updated kubectl version for CDK v1 to 1.22. Because the Kubernetes version supported by EKS is now 1.22 and above, it no longer makes sense to use an older version of kubectl.
Closes #19843 #22604 for CDK v1
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license