Skip to content

Commit 1ef05ea

Browse files
authored
Enforce IMDSv2 in K8s (#465)
Following https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-instance-settings *Rollback procedure:* We should be able to just rollback. *Ensure you've run the following tests on your changes and include the link below:* Testing **PENDING** To do so, create a `test.yml` file with `name: Test` and workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing. NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the [needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds) keyword to run tests in succession. - Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and eu-central-2 - Run EC2 tests in all regions - Run K8s on a separate K8s cluster (check IAD test account for master node endpoints; these will change as we create and destroy clusters for OS patching) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent a7bc14c commit 1ef05ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/util/setup-k8s.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function create_resources() {
3838
--iam-instance-profile Name=$INSTANCE_PROFILE \
3939
--associate-public-ip-address \
4040
--block-device-mappings 'DeviceName=/dev/xvda,Ebs={VolumeSize=80,VolumeType=gp3}' \
41-
--metadata-options 'HttpPutResponseHopLimit=3,HttpEndpoint=enabled' \
41+
--metadata-options 'HttpPutResponseHopLimit=3,HttpEndpoint=enabled,HttpTokens=required' \
4242
--query 'Instances[0].InstanceId' \
4343
--output text)
4444

@@ -54,7 +54,7 @@ function create_resources() {
5454
--iam-instance-profile Name=$INSTANCE_PROFILE \
5555
--associate-public-ip-address \
5656
--block-device-mappings 'DeviceName=/dev/xvda,Ebs={VolumeSize=80,VolumeType=gp3}' \
57-
--metadata-options 'HttpPutResponseHopLimit=3,HttpEndpoint=enabled' \
57+
--metadata-options 'HttpPutResponseHopLimit=3,HttpEndpoint=enabled,HttpTokens=required' \
5858
--query 'Instances[0].InstanceId' \
5959
--output text)
6060

0 commit comments

Comments
 (0)