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

Bumped production release number for 1.29 #3375

Closed
wants to merge 3 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Carter McKinnon <[email protected]>
Date: Wed, 16 Oct 2024 08:53:29 -0700
Subject: [PATCH] --EKS-PATCH-- Add instanceExistsGracePeriod to
cloud-node-lifecycle-controller

---
.../node_lifecycle_controller.go | 38 +++++++++++++++----
1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
index b8a50e42cdd..50b0b896478 100644
--- a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
+++ b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
@@ -19,9 +19,11 @@ package cloud
import (
"context"
"errors"
+ "fmt"
+ "os"
"time"

- "k8s.io/api/core/v1"
+ v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
@@ -65,6 +67,9 @@ type CloudNodeLifecycleController struct {
// check node status posted from kubelet. This value should be lower than nodeMonitorGracePeriod
// set in controller-manager
nodeMonitorPeriod time.Duration
+
+ // Period of time after Node creation that the controller will assume the corresponding cloud instance exists
+ instanceExistsGracePeriod time.Duration
}

func NewCloudNodeLifecycleController(
@@ -90,13 +95,26 @@ func NewCloudNodeLifecycleController(
return nil, errors.New("cloud provider does not support instances")
}

+ var instanceExistsGracePeriod time.Duration
+ instanceExistsGracePeriodFromEnv := os.Getenv("NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD")
+ if instanceExistsGracePeriodFromEnv != "" {
+ if period, err := time.ParseDuration(instanceExistsGracePeriodFromEnv); err != nil {
+ return nil, fmt.Errorf("invalid NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD: '%s': %v", instanceExistsGracePeriodFromEnv, err)
+ } else {
+ instanceExistsGracePeriod = period
+ }
+ } else {
+ instanceExistsGracePeriod = 2 * time.Minute
+ }
+
c := &CloudNodeLifecycleController{
- kubeClient: kubeClient,
- nodeLister: nodeInformer.Lister(),
- broadcaster: eventBroadcaster,
- recorder: recorder,
- cloud: cloud,
- nodeMonitorPeriod: nodeMonitorPeriod,
+ kubeClient: kubeClient,
+ nodeLister: nodeInformer.Lister(),
+ broadcaster: eventBroadcaster,
+ recorder: recorder,
+ cloud: cloud,
+ nodeMonitorPeriod: nodeMonitorPeriod,
+ instanceExistsGracePeriod: instanceExistsGracePeriod,
}

return c, nil
@@ -150,6 +168,12 @@ func (c *CloudNodeLifecycleController) MonitorNodes(ctx context.Context) {
continue
}

+ // skip the node if it was recently created, it may not have propagated in cloud provider yet
+ if time.Since(node.CreationTimestamp.Time) < c.instanceExistsGracePeriod {
+ klog.Infof("skipping node %s that was created within grace period (%v)", node.Name, c.instanceExistsGracePeriod)
+ continue
+ }
+
// At this point the node has NotReady status, we need to check if the node has been removed
// from the cloud provider. If node cannot be found in cloudprovider, then delete the node
exists, err := c.ensureNodeExistsByProviderID(ctx, node)
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Carter McKinnon <[email protected]>
Date: Wed, 16 Oct 2024 08:50:40 -0700
Subject: [PATCH] --EKS-PATCH-- Add instanceExistsGracePeriod to
cloud-node-lifecycle-controller

---
.../node_lifecycle_controller.go | 38 +++++++++++++++----
1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
index b8a50e42cdd..50b0b896478 100644
--- a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
+++ b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
@@ -19,9 +19,11 @@ package cloud
import (
"context"
"errors"
+ "fmt"
+ "os"
"time"

- "k8s.io/api/core/v1"
+ v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
@@ -65,6 +67,9 @@ type CloudNodeLifecycleController struct {
// check node status posted from kubelet. This value should be lower than nodeMonitorGracePeriod
// set in controller-manager
nodeMonitorPeriod time.Duration
+
+ // Period of time after Node creation that the controller will assume the corresponding cloud instance exists
+ instanceExistsGracePeriod time.Duration
}

func NewCloudNodeLifecycleController(
@@ -90,13 +95,26 @@ func NewCloudNodeLifecycleController(
return nil, errors.New("cloud provider does not support instances")
}

+ var instanceExistsGracePeriod time.Duration
+ instanceExistsGracePeriodFromEnv := os.Getenv("NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD")
+ if instanceExistsGracePeriodFromEnv != "" {
+ if period, err := time.ParseDuration(instanceExistsGracePeriodFromEnv); err != nil {
+ return nil, fmt.Errorf("invalid NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD: '%s': %v", instanceExistsGracePeriodFromEnv, err)
+ } else {
+ instanceExistsGracePeriod = period
+ }
+ } else {
+ instanceExistsGracePeriod = 2 * time.Minute
+ }
+
c := &CloudNodeLifecycleController{
- kubeClient: kubeClient,
- nodeLister: nodeInformer.Lister(),
- broadcaster: eventBroadcaster,
- recorder: recorder,
- cloud: cloud,
- nodeMonitorPeriod: nodeMonitorPeriod,
+ kubeClient: kubeClient,
+ nodeLister: nodeInformer.Lister(),
+ broadcaster: eventBroadcaster,
+ recorder: recorder,
+ cloud: cloud,
+ nodeMonitorPeriod: nodeMonitorPeriod,
+ instanceExistsGracePeriod: instanceExistsGracePeriod,
}

return c, nil
@@ -150,6 +168,12 @@ func (c *CloudNodeLifecycleController) MonitorNodes(ctx context.Context) {
continue
}

+ // skip the node if it was recently created, it may not have propagated in cloud provider yet
+ if time.Since(node.CreationTimestamp.Time) < c.instanceExistsGracePeriod {
+ klog.Infof("skipping node %s that was created within grace period (%v)", node.Name, c.instanceExistsGracePeriod)
+ continue
+ }
+
// At this point the node has NotReady status, we need to check if the node has been removed
// from the cloud provider. If node cannot be found in cloudprovider, then delete the node
exists, err := c.ensureNodeExistsByProviderID(ctx, node)
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Carter McKinnon <[email protected]>
Date: Wed, 16 Oct 2024 08:48:04 -0700
Subject: [PATCH] --EKS-PATCH-- Add instanceExistsGracePeriod to
cloud-node-lifecycle-controller

---
.../node_lifecycle_controller.go | 38 +++++++++++++++----
1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
index b8a50e42cdd..50b0b896478 100644
--- a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
+++ b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
@@ -19,9 +19,11 @@ package cloud
import (
"context"
"errors"
+ "fmt"
+ "os"
"time"

- "k8s.io/api/core/v1"
+ v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
@@ -65,6 +67,9 @@ type CloudNodeLifecycleController struct {
// check node status posted from kubelet. This value should be lower than nodeMonitorGracePeriod
// set in controller-manager
nodeMonitorPeriod time.Duration
+
+ // Period of time after Node creation that the controller will assume the corresponding cloud instance exists
+ instanceExistsGracePeriod time.Duration
}

func NewCloudNodeLifecycleController(
@@ -90,13 +95,26 @@ func NewCloudNodeLifecycleController(
return nil, errors.New("cloud provider does not support instances")
}

+ var instanceExistsGracePeriod time.Duration
+ instanceExistsGracePeriodFromEnv := os.Getenv("NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD")
+ if instanceExistsGracePeriodFromEnv != "" {
+ if period, err := time.ParseDuration(instanceExistsGracePeriodFromEnv); err != nil {
+ return nil, fmt.Errorf("invalid NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD: '%s': %v", instanceExistsGracePeriodFromEnv, err)
+ } else {
+ instanceExistsGracePeriod = period
+ }
+ } else {
+ instanceExistsGracePeriod = 2 * time.Minute
+ }
+
c := &CloudNodeLifecycleController{
- kubeClient: kubeClient,
- nodeLister: nodeInformer.Lister(),
- broadcaster: eventBroadcaster,
- recorder: recorder,
- cloud: cloud,
- nodeMonitorPeriod: nodeMonitorPeriod,
+ kubeClient: kubeClient,
+ nodeLister: nodeInformer.Lister(),
+ broadcaster: eventBroadcaster,
+ recorder: recorder,
+ cloud: cloud,
+ nodeMonitorPeriod: nodeMonitorPeriod,
+ instanceExistsGracePeriod: instanceExistsGracePeriod,
}

return c, nil
@@ -150,6 +168,12 @@ func (c *CloudNodeLifecycleController) MonitorNodes(ctx context.Context) {
continue
}

+ // skip the node if it was recently created, it may not have propagated in cloud provider yet
+ if time.Since(node.CreationTimestamp.Time) < c.instanceExistsGracePeriod {
+ klog.Infof("skipping node %s that was created within grace period (%v)", node.Name, c.instanceExistsGracePeriod)
+ continue
+ }
+
// At this point the node has NotReady status, we need to check if the node has been removed
// from the cloud provider. If node cannot be found in cloudprovider, then delete the node
exists, err := c.ensureNodeExistsByProviderID(ctx, node)
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Carter McKinnon <[email protected]>
Date: Wed, 16 Oct 2024 08:40:14 -0700
Subject: [PATCH] --EKS-PATCH-- Add instanceExistsGracePeriod to
cloud-node-lifecycle-controller

---
.../node_lifecycle_controller.go | 32 ++++++++++++++++---
1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
index 2c1e63dae39..97e4bd4f5c4 100644
--- a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
+++ b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go
@@ -19,6 +19,8 @@ package cloud
import (
"context"
"errors"
+ "fmt"
+ "os"
"time"

v1 "k8s.io/api/core/v1"
@@ -66,6 +68,9 @@ type CloudNodeLifecycleController struct {
// check node status posted from kubelet. This value should be lower than nodeMonitorGracePeriod
// set in controller-manager
nodeMonitorPeriod time.Duration
+
+ // Period of time after Node creation that the controller will assume the corresponding cloud instance exists
+ instanceExistsGracePeriod time.Duration
}

func NewCloudNodeLifecycleController(
@@ -88,11 +93,24 @@ func NewCloudNodeLifecycleController(
return nil, errors.New("cloud provider does not support instances")
}

+ var instanceExistsGracePeriod time.Duration
+ instanceExistsGracePeriodFromEnv := os.Getenv("NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD")
+ if instanceExistsGracePeriodFromEnv != "" {
+ if period, err := time.ParseDuration(instanceExistsGracePeriodFromEnv); err != nil {
+ return nil, fmt.Errorf("invalid NODE_LIFECYCLE_CONTROLLER_INSTANCE_EXISTS_GRACE_PERIOD: '%s': %v", instanceExistsGracePeriodFromEnv, err)
+ } else {
+ instanceExistsGracePeriod = period
+ }
+ } else {
+ instanceExistsGracePeriod = 2 * time.Minute
+ }
+
c := &CloudNodeLifecycleController{
- kubeClient: kubeClient,
- nodeLister: nodeInformer.Lister(),
- cloud: cloud,
- nodeMonitorPeriod: nodeMonitorPeriod,
+ kubeClient: kubeClient,
+ nodeLister: nodeInformer.Lister(),
+ cloud: cloud,
+ nodeMonitorPeriod: nodeMonitorPeriod,
+ instanceExistsGracePeriod: instanceExistsGracePeriod,
}

return c, nil
@@ -149,6 +167,12 @@ func (c *CloudNodeLifecycleController) MonitorNodes(ctx context.Context) {
continue
}

+ // skip the node if it was recently created, it may not have propagated in cloud provider yet
+ if time.Since(node.CreationTimestamp.Time) < c.instanceExistsGracePeriod {
+ klog.Infof("skipping node %s that was created within grace period (%v)", node.Name, c.instanceExistsGracePeriod)
+ continue
+ }
+
// At this point the node has NotReady status, we need to check if the node has been removed
// from the cloud provider. If node cannot be found in cloudprovider, then delete the node
exists, err := c.ensureNodeExistsByProviderID(ctx, node)
2 changes: 1 addition & 1 deletion release/1-29/production/RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23
24
Loading