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

Added new patch to 1.25 #2334

Merged
merged 4 commits into from
Sep 8, 2023
Merged
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
38 changes: 19 additions & 19 deletions projects/kubernetes/kubernetes/1-25/CHECKSUMS
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
0a9e18c764c7b3916aa3f6d7f25d88778e7e751d1f1ca301dcbb8c6df63661eb _output/1-25/bin/darwin/amd64/kubectl
5dba05c3f5a3605eb5cfe8895d608348c1acc9216b6b49742e465097a420bcc5 _output/1-25/bin/linux/amd64/kube-apiserver
9d9510b43714e0e799b5b1eb35773807c0e7a7866d867a8215e42b89ed130ae0 _output/1-25/bin/linux/amd64/kube-controller-manager
327087fb7e39d63f7339381b44ddbccaf968de040bb9b662c54338c494cd216b _output/1-25/bin/linux/amd64/kube-proxy
4c5e7c4e5abd7f132fa3055b68c2f18e99bc770e0fcb8bed789acf6771b42248 _output/1-25/bin/linux/amd64/kube-scheduler
0be30c7de18ba85dc97ed277bc898673aac52314ac2d66b83d7d774885d7f722 _output/1-25/bin/linux/amd64/kubeadm
5edd9d1f42c9a5451c6d25b9bc7e2d5bbda685b36536ff34c61b7e9c3d06b8d7 _output/1-25/bin/linux/amd64/kubectl
67ca1be39f9eccaf7a0df6ba7487a918e9b5cd788b1b5adfc15531dba064a98b _output/1-25/bin/linux/amd64/kubelet
144d6fba5f8cf48a50ee436c6cc295768c5830d6a351a27ee35007d8936214a8 _output/1-25/bin/linux/arm64/kube-apiserver
3d3646ceb9155137bf4e03705b96c77687485d88bc76d11d85142c496def53cb _output/1-25/bin/linux/arm64/kube-controller-manager
29524b46adec8c05eb700dc2065f4843318724fe96dc620f83b4b0c6d6652110 _output/1-25/bin/linux/arm64/kube-proxy
2c23e2cd7e3c4f3bdc25a8436e93af7171d500374b5961ba5a12467460beaa79 _output/1-25/bin/linux/arm64/kube-scheduler
f1681387856c0bf5e03cceaf1f7d3e70ebd7996e4e53b7c43972b406cd9f7e5d _output/1-25/bin/linux/arm64/kubeadm
918bc7c9e499a8a08d3c9dbd418b82c39b7476ee1be6ad264f3e3c9ef8d62b7d _output/1-25/bin/linux/arm64/kubectl
28f5677603501348f43226931bfd4f89a1158a00c50d178ac6996db8d40225a9 _output/1-25/bin/linux/arm64/kubelet
53a299386caed4e554ca751761aa25db38cace85b668092e5645f33f37629022 _output/1-25/bin/windows/amd64/kube-proxy.exe
a0ff444ac418e342012bce2c8b6cbb384332fffe6aba8b579303335f763f5fc6 _output/1-25/bin/windows/amd64/kubeadm.exe
b251789b32463649d63d5c75fe9b147eabe8c2efb1893758e484b8297a3d28d9 _output/1-25/bin/windows/amd64/kubectl.exe
edf5a27a3513bc641fa7099306c3bb365e0c9846a4e7f967c66677e6c8ab11cd _output/1-25/bin/windows/amd64/kubelet.exe
f2c919b8dd6aa82841713f708feb63bd3aab01bf5e3bff3d435bf28cbc166ff4 _output/1-25/bin/darwin/amd64/kubectl
86ff7213fbf219a4c71dddf7fc864b0d6007076534351cda55adc6f2cf053043 _output/1-25/bin/linux/amd64/kube-apiserver
322e602f7d852ca35f5bbe0abee15ce91961ec8430be9e3148b345c2b5d61d1f _output/1-25/bin/linux/amd64/kube-controller-manager
7a25e7c82872dd147e5f3dae3988fbeba6f036a08929d96de9672a49687e88a6 _output/1-25/bin/linux/amd64/kube-proxy
ff637f97c3043ceb49a9c7751bd93ec170258a47b14c6ca67187b1ff84f9e819 _output/1-25/bin/linux/amd64/kube-scheduler
ed518859d88073d91e930f3c5b7ea20ddba2152e0d5343e25514322e6c6017f5 _output/1-25/bin/linux/amd64/kubeadm
5bb58a42dacf2da6f7a7304881fe7c7501badaae9cfb7b28ca5df845ed89ae78 _output/1-25/bin/linux/amd64/kubectl
e4f1808d0cd0fa966db0e1bfa6786ec7b1057086248e5ee0ebe59ec6fb6ace28 _output/1-25/bin/linux/amd64/kubelet
c793ee2789ef36c91f5b5ccc36491c97ff751b9331d9f0bf1648d77b92041321 _output/1-25/bin/linux/arm64/kube-apiserver
92c836c350bfd89103f33e7abfb9fd7e978d0682372f1c7f90808d546d0dc94a _output/1-25/bin/linux/arm64/kube-controller-manager
22a513b059f2027b54388dda436645555556f1fd32cd629f96ee85918d2f60b8 _output/1-25/bin/linux/arm64/kube-proxy
960d490eb2f74e9c8f7fdec36abf60cb78bb8608f2021854a39cbf84f057a686 _output/1-25/bin/linux/arm64/kube-scheduler
2675f8e7ecbf564ebeb0605c2be2984ff261814e2cf8f092107bca26522d5436 _output/1-25/bin/linux/arm64/kubeadm
860696e152eab7ce7860b4bf70e16a23ed587a1cb190f802e70d9480cdf18006 _output/1-25/bin/linux/arm64/kubectl
34dff4e9fbad33512959356bc218855cc4f00095f02ceaaa2a8a7f1dab8e9a8d _output/1-25/bin/linux/arm64/kubelet
469165e09025ae09cd3916c6c0dab68176ed296d8f6b9974415cf9fa702789d6 _output/1-25/bin/windows/amd64/kube-proxy.exe
dbe7db452d72c00369222dc1816276156ae9de8354bf10617d49970f8aed5f18 _output/1-25/bin/windows/amd64/kubeadm.exe
ef53980ae3a475b423792ac7c26ffd49230dd59114bc885e83eb41390a3add13 _output/1-25/bin/windows/amd64/kubectl.exe
27c48255dd0f14835ac3e8411ebea27b3bd7e6c282cf885240c7cc4b6d0a30c5 _output/1-25/bin/windows/amd64/kubelet.exe
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Carter McKinnon <[email protected]>
Date: Thu, 24 Aug 2023 09:21:43 -0700
Subject: [PATCH] --EKS-PATCH-- Handle eventually-consistent EC2 PrivateDnsName

---
.../k8s.io/legacy-cloud-providers/aws/aws.go | 34 ++++++++++++++++---
1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go
index 434df20cc2e..5df947d6ed5 100644
--- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go
+++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go
@@ -282,6 +282,14 @@ const (
volumeCreateBackoffFactor = 1.2
volumeCreateBackoffSteps = 10

+ // acquireNodeName* is configuration of exponential backoff for acquiring this instance's
+ // node name (currently the EC2 PrivateDnsName) during cloud provider initialization.
+ // This value is eventually-consistent.
+ // The current config will make its final attempt after ~130 seconds.
+ acquireNodeNameInitialDelay = 5 * time.Second
+ acquireNodeNameBackoffFactor = 1.25
+ acquireNodeNameBackoffSteps = 10
+
// Number of node names that can be added to a filter. The AWS limit is 200
// but we are using a lower limit on purpose
filterNodeLimit = 150
@@ -2432,11 +2440,29 @@ func (c *Cloud) buildSelfAWSInstance() (*awsInstance, error) {
// information from the instance returned by the EC2 API - it is a
// single API call to get all the information, and it means we don't
// have two code paths.
- instance, err := c.getInstanceByID(instanceID)
- if err != nil {
- return nil, fmt.Errorf("error finding instance %s: %q", instanceID, err)
+ // The PrivateDnsName is eventually-consistent, and we can't complete
+ // initialization until we acquire it.
+ backoff := wait.Backoff{
+ Duration: acquireNodeNameInitialDelay,
+ Factor: acquireNodeNameBackoffFactor,
+ Steps: acquireNodeNameBackoffSteps,
}
- return newAWSInstance(c.ec2, instance), nil
+ var awsInstance *awsInstance
+ err = wait.ExponentialBackoff(backoff, func() (done bool, err error) {
+ instance, err := c.getInstanceByID(instanceID)
+ if err != nil {
+ return true, fmt.Errorf("error finding instance %s: %q", instanceID, err)
+ }
+ awsInstance = newAWSInstance(c.ec2, instance)
+ if awsInstance.nodeName != "" {
+ return true, nil
+ }
+ return false, nil
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to acquire node name for instance %s: %q", instanceID, err)
+ }
+ return awsInstance, nil
}

// wrapAttachError wraps the error returned by an AttachVolume request with