Skip to content

Commit 035fa79

Browse files
olemarkusjohngmyers
andcommittedNov 17, 2022
Set IMDS max hop limit to 1 for control plane nodes
Update docs/releases/1.26-NOTES.md Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
1 parent 2f59911 commit 035fa79

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed
 

‎docs/releases/1.26-NOTES.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This is a document to gather the release notes prior to the release.
1616

1717
* The AWS Load Balancer, when enabled, will run on worker nodes if IRSA is enabled as of Kubernetes version 1.24.
1818

19+
* As of Kubernetes version 1.26 and with IRSA enabled, control plane nodes will now run with a max hop limit of 1 for the metadata service. This will prevent Pods without host networking from accessing the instance metadata service.
20+
1921
# Breaking changes
2022

2123
## Other breaking changes

‎tests/integration/create_cluster/minimal-1.26-irsa/expected-v1alpha2.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ metadata:
7070
spec:
7171
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20221018
7272
instanceMetadata:
73-
httpPutResponseHopLimit: 3
73+
httpPutResponseHopLimit: 1
7474
httpTokens: required
7575
machineType: m3.medium
7676
maxSize: 1

‎upup/pkg/fi/cloudup/new_cluster.go

+3
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,9 @@ func setupMasters(opt *NewClusterOptions, cluster *api.Cluster, zoneToSubnetMap
855855
HTTPTokens: fi.String("required"),
856856
}
857857
}
858+
if cluster.IsKubernetesGTE("1.26") && fi.BoolValue(cluster.Spec.IAM.UseServiceAccountExternalPermissions) {
859+
g.Spec.InstanceMetadata.HTTPPutResponseHopLimit = fi.Int64(1)
860+
}
858861
}
859862

860863
g.Spec.MachineType = opt.MasterSize

0 commit comments

Comments
 (0)