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(eks): add k8s v1.22 #19756

Merged
merged 6 commits into from
Apr 5, 2022
Merged

feat(eks): add k8s v1.22 #19756

merged 6 commits into from
Apr 5, 2022

Conversation

robertd
Copy link
Contributor

@robertd robertd commented Apr 4, 2022

EKS 1.22 just got released

https://aws.amazon.com/blogs/containers/amazon-eks-now-supports-kubernetes-1-22/

https://aws.amazon.com/about-aws/whats-new/2022/04/amazon-eks-distro-eks-anywhere-kubernetes-1-22/


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use cdk-integ to deploy the infrastructure and generate the snapshot (i.e. cdk-integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Apr 4, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team April 4, 2022 22:06
@github-actions github-actions bot added the p2 label Apr 4, 2022
@robertd
Copy link
Contributor Author

robertd commented Apr 5, 2022

Hi @otaviomacedo (not sure why github bot didn't auto assign it to you 😄 )

@rix0rrr
Copy link
Contributor

rix0rrr commented Apr 5, 2022

Does the kubectl client we bundle work with this server version?

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

Thanks for the submission, this looks great!

@mergify
Copy link
Contributor

mergify bot commented Apr 5, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 8134740
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 9a518c5 into aws:master Apr 5, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 5, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

This was referenced Apr 7, 2022
mergify bot added a commit that referenced this pull request Apr 7, 2022
See [CHANGELOG](https://github.com/aws/aws-cdk/blob/bump/1.152.0/CHANGELOG.md)

For convenience, extracted the relevant CHANGELOG entry:

## [1.152.0](v1.151.0...v1.152.0) (2022-04-06)


### Features

* **cfnspec:** cloudformation spec v63.0.0 ([#19679](#19679)) ([dba96a9](dba96a9))
* **cfnspec:** cloudformation spec v65.0.0 ([#19745](#19745)) ([796fc64](796fc64))
* **cli:** add --build option ([#19663](#19663)) ([eb9b8e2](eb9b8e2)), closes [#19667](#19667)
* **cli:** preview of `cdk import` ([#17666](#17666)) ([4f12209](4f12209))
* **core:** throw error when stack name exceeds max length ([#19725](#19725)) ([1ffd45e](1ffd45e))
* **eks:** add k8s v1.22 ([#19756](#19756)) ([9a518c5](9a518c5))
* **opensearch:** Add latest Opensearch Version 1.2 ([#19749](#19749)) ([a2ac36e](a2ac36e))
* add new integration test runner ([#19754](#19754)) ([1b4d010](1b4d010))
* **eks:** alb-controller v2.4.1 ([#19653](#19653)) ([1ec08df](1ec08df))
* **lambda:** add support for ephemeral storage ([#19552](#19552)) ([f1d9b6a](f1d9b6a)), closes [#19605](#19605)
* **s3:** EventBridge bucket notifications ([#18614](#18614)) ([d8e602b](d8e602b)), closes [#18076](#18076)
* **synthetics:** new puppeteer 3.5 runtime ([#19673](#19673)) ([ce2b91b](ce2b91b)), closes [#19634](#19634)


### Bug Fixes

* **aws_applicationautoscaling:** Add missing members to PredefinedMetric enum ([#18978](#18978)) ([75a6fa7](75a6fa7)), closes [#18969](#18969)
* **cli:** apps with many resources scroll resource output offscreen ([#19742](#19742)) ([053d22c](053d22c)), closes [#19160](#19160)
* **cli:** support attributes of DynamoDB Tables for hotswapping ([#19620](#19620)) ([2321ece](2321ece)), closes [#19421](#19421)
* **cloudwatch:** automatic metric math label cannot be suppressed ([#17639](#17639)) ([7fa3bf2](7fa3bf2))
* **codedeploy:** add name validation for Application, Deployment Group and Deployment Configuration ([#19473](#19473)) ([9185042](9185042))
* **codedeploy:** the Service Principal is wrong in isolated regions ([#19729](#19729)) ([7e9a43d](7e9a43d)), closes [#19399](#19399)
* **core:** `Fn.select` incorrectly short-circuits complex expressions ([#19680](#19680)) ([7f26fad](7f26fad))
* **core:** detect and resolve stringified number tokens ([#19578](#19578)) ([7d9ab2a](7d9ab2a)), closes [#19546](#19546) [#19550](#19550)
* **core:** reduce CFN template indent size to save bytes ([#19656](#19656)) ([fd63ca3](fd63ca3))
* **ecs:** 'desiredCount' and 'ephemeralStorageGiB' cannot be tokens ([#19453](#19453)) ([c852239](c852239)), closes [#16648](#16648)
* **ecs:** remove unnecessary error when adding volume to external task definition ([#19774](#19774)) ([5446ded](5446ded)), closes [#19259](#19259)
* **iam:** policies aren't minimized as far as possible ([#19764](#19764)) ([876ed8a](876ed8a)), closes [#19751](#19751)
* **logs:** Faulty Resource Policy Generated ([#19640](#19640)) ([1fdf122](1fdf122)), closes [#17544](#17544)
mergify bot added a commit that referenced this pull request Apr 7, 2022
See [CHANGELOG](https://github.com/aws/aws-cdk/blob/bump/2.20.0/CHANGELOG.md)

For convenience, extracted the relevant CHANGELOG entry:

## [2.20.0](v2.19.0...v2.20.0) (2022-04-07)


### Features

* **cfnspec:** cloudformation spec v63.0.0 ([#19679](#19679)) ([dba96a9](dba96a9))
* **cfnspec:** cloudformation spec v65.0.0 ([#19745](#19745)) ([796fc64](796fc64))
* **cli:** add --build option ([#19663](#19663)) ([eb9b8e2](eb9b8e2)), closes [#19667](#19667)
* **cli:** preview of `cdk import` ([#17666](#17666)) ([4f12209](4f12209))
* **core:** throw error when stack name exceeds max length ([#19725](#19725)) ([1ffd45e](1ffd45e))
* **eks:** add k8s v1.22 ([#19756](#19756)) ([9a518c5](9a518c5))
* **opensearch:** Add latest Opensearch Version 1.2 ([#19749](#19749)) ([a2ac36e](a2ac36e))
* add new integration test runner ([#19754](#19754)) ([1b4d010](1b4d010))
* **eks:** alb-controller v2.4.1 ([#19653](#19653)) ([1ec08df](1ec08df))
* **lambda:** add support for ephemeral storage ([#19552](#19552)) ([f1d9b6a](f1d9b6a)), closes [#19605](#19605)
* **s3:** EventBridge bucket notifications ([#18614](#18614)) ([d8e602b](d8e602b)), closes [#18076](#18076)


### Bug Fixes

* **aws_applicationautoscaling:** Add missing members to PredefinedMetric enum ([#18978](#18978)) ([75a6fa7](75a6fa7)), closes [#18969](#18969)
* **cli:** apps with many resources scroll resource output offscreen ([#19742](#19742)) ([053d22c](053d22c)), closes [#19160](#19160)
* **cli:** support attributes of DynamoDB Tables for hotswapping ([#19620](#19620)) ([2321ece](2321ece)), closes [#19421](#19421)
* **cloudwatch:** automatic metric math label cannot be suppressed ([#17639](#17639)) ([7fa3bf2](7fa3bf2))
* **codedeploy:** add name validation for Application, Deployment Group and Deployment Configuration ([#19473](#19473)) ([9185042](9185042))
* **codedeploy:** the Service Principal is wrong in isolated regions ([#19729](#19729)) ([7e9a43d](7e9a43d)), closes [#19399](#19399)
* **core:** `Fn.select` incorrectly short-circuits complex expressions ([#19680](#19680)) ([7f26fad](7f26fad))
* **core:** detect and resolve stringified number tokens ([#19578](#19578)) ([7d9ab2a](7d9ab2a)), closes [#19546](#19546) [#19550](#19550)
* **core:** reduce CFN template indent size to save bytes ([#19656](#19656)) ([fd63ca3](fd63ca3))
* **ecs:** 'desiredCount' and 'ephemeralStorageGiB' cannot be tokens ([#19453](#19453)) ([c852239](c852239)), closes [#16648](#16648)
* **ecs:** remove unnecessary error when adding volume to external task definition ([#19774](#19774)) ([5446ded](5446ded)), closes [#19259](#19259)
* **iam:** policies aren't minimized as far as possible ([#19764](#19764)) ([876ed8a](876ed8a)), closes [#19751](#19751)
* **logs:** Faulty Resource Policy Generated ([#19640](#19640)) ([1fdf122](1fdf122)), closes [#17544](#17544)
@robertd
Copy link
Contributor Author

robertd commented Apr 8, 2022

Does the kubectl client we bundle work with this server version?

Sorry @rix0rrr I somehow missed this question. Answer is yes.

image

@robertd robertd deleted the eks branch April 8, 2022 02:35
@damienpuig
Copy link

@robertd Are we certain the kubectl bundled works fine?

Upon updating (1.21 => 1.22 - No extensions/v1beta1 ressources) I am starting to get through Cloudwatch lambda logs:

 Cluster/AwsAuth/manifest/Resource/Default (ClusterAwsAuthmanifestFE51F8AE) Received response status [FAILED] from custom resource. Message returned: Error: b'configmap/aws-auth configured\nerror: error retrieving RESTMappings to prune: invalid resource extensions/v1beta1, Kind=Ingress, Namespaced=true: no matches for kind "Ingress" in version "extensions/v1beta1"\n'
2022-04-08T11:39:47.580+02:00Copy[ERROR] Exception: b'configmap/aws-auth configured\nerror: error retrieving RESTMappings to prune: invalid resource extensions/v1beta1, Kind=Ingress, Namespaced=true: no matches for kind "Ingress" in version "extensions/v1beta1"\n'Traceback (most recent call last):  File "/var/task/index.py", line 14, in handler    return apply_handler(event, context)  File "/var/task/apply/__init__.py", line 69, in apply_handler    kubectl('apply', manifest_file, *kubectl_opts)  File "/var/task/apply/__init__.py", line 91, in kubectl    raise Exception(output) | [ERROR] Exception: b'configmap/aws-auth configured\nerror: error retrieving RESTMappings to prune: invalid resource extensions/v1beta1, Kind=Ingress, Namespaced=true: no matches for kind "Ingress" in version "extensions/v1beta1"\n' Traceback (most recent call last):   File "/var/task/index.py", line 14, in handler     return apply_handler(event, context)   File "/var/task/apply/__init__.py", line 69, in apply_handler     kubectl('apply', manifest_file, *kubectl_opts)   File "/var/task/apply/__init__.py", line 91, in kubectl     raise Exception(output)
-- | --

From the kubectl internal bootstrap command

[INFO]	2022-04-08T09:39:45.849Z Running command: ['kubectl', 'apply', '--kubeconfig', '/tmp/kubeconfig', '-f', '/tmp/manifest.yaml', '--prune', '-l', 'aws.cdk.eks/prune-<ID>']

@damienpuig
Copy link

Update: It is a compatibility issue during the pruning process - deactivating pruning worked fine for now

robertd added a commit to robertd/aws-cdk that referenced this pull request Apr 20, 2022
This commit reverts addition of the latest version of EKS (1.22) to CDK as there are some incompatibilities between the current lambda-layer-kubectl and v1.22 EKS cluster.
Preferably we would have multiple versions fo kubectl lambda layer, but we are currently struggling with package size issues. kubectl is large, and our package is larger,
and adding multiple kubectls to it will make it exceed size limits of package managers. So we can't do this right now, until we have invested significant engineering
effort into lifting those limitations. In order to not break the backward compatibility with <=1.20 versions, it was decided to revert this addition PR until
all the underlying issues around package size issues are resolved.

This reverts commit 9a518c5.
robertd added a commit to robertd/aws-cdk that referenced this pull request Apr 21, 2022
This commit reverts addition of the latest version of EKS (1.22) to CDK as there are some incompatibilities between the current lambda-layer-kubectl and v1.22 EKS cluster.
Preferably we would have multiple versions fo kubectl lambda layer, but we are currently struggling with package size issues. kubectl is large, and our package is larger,
and adding multiple kubectls to it will make it exceed size limits of package managers. So we can't do this right now, until we have invested significant engineering
effort into lifting those limitations. In order to not break the backward compatibility with <=1.20 versions, it was decided to revert this addition PR until
all the underlying issues around package size issues are resolved.

This reverts commit 9a518c5.
robertd added a commit to robertd/aws-cdk that referenced this pull request Apr 21, 2022
This commit reverts addition of the latest version of EKS (1.22) to CDK as there are some incompatibilities between the current lambda-layer-kubectl and v1.22 EKS cluster.
Preferably we would have multiple versions fo kubectl lambda layer, but we are currently struggling with package size issues. kubectl is large, and our package is larger,
and adding multiple kubectls to it will make it exceed size limits of package managers. So we can't do this right now, until we have invested significant engineering
effort into lifting those limitations. In order to not break the backward compatibility with <=1.20 versions, it was decided to revert this addition PR until
all the underlying issues around package size issues are resolved.

This reverts commit 9a518c5.
mergify bot pushed a commit that referenced this pull request Apr 21, 2022
Revert "feat(eks): add k8s v1.22 (#19756)"

This commit reverts addition of the latest version of EKS (1.22) to CDK as there are some incompatibilities between the current lambda-layer-kubectl and v1.22 EKS cluster. Preferably we would have multiple versions fo kubectl lambda layer, but we are currently struggling with package size issues. kubectl is large, and our package is larger, and adding multiple kubectls to it will make it exceed size limits of package managers. So we can't do this right now, until we have invested significant engineering effort into lifting those limitations. In order to not break the backward compatibility with <=1.20 versions, it was decided to revert this addition PR until all the underlying issues around package size issues are resolved.

cc @rix0rrr

Close #19919 

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
StevePotter pushed a commit to StevePotter/aws-cdk that referenced this pull request Apr 27, 2022
EKS 1.22 just got released

https://aws.amazon.com/blogs/containers/amazon-eks-now-supports-kubernetes-1-22/

https://aws.amazon.com/about-aws/whats-new/2022/04/amazon-eks-distro-eks-anywhere-kubernetes-1-22/

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
StevePotter pushed a commit to StevePotter/aws-cdk that referenced this pull request Apr 27, 2022
Revert "feat(eks): add k8s v1.22 (aws#19756)"

This commit reverts addition of the latest version of EKS (1.22) to CDK as there are some incompatibilities between the current lambda-layer-kubectl and v1.22 EKS cluster. Preferably we would have multiple versions fo kubectl lambda layer, but we are currently struggling with package size issues. kubectl is large, and our package is larger, and adding multiple kubectls to it will make it exceed size limits of package managers. So we can't do this right now, until we have invested significant engineering effort into lifting those limitations. In order to not break the backward compatibility with <=1.20 versions, it was decided to revert this addition PR until all the underlying issues around package size issues are resolved.

cc @rix0rrr

Close aws#19919 

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@robertd
Copy link
Contributor Author

robertd commented May 2, 2022

Link #15736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants