Skip to content

Commit

Permalink
rename finalizer, and shorten wait time to get CNINode
Browse files Browse the repository at this point in the history
  • Loading branch information
sushrk committed Mar 12, 2024
1 parent f845e81 commit a9563f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions controllers/crds/cninode_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ func (r *CNINodeReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *CNINodeReconciler) waitTillCNINodeDeleted(ctx context.Context, nameSpacedCNINode types.NamespacedName) error {
oldCNINode := &v1alpha1.CNINode{}

ctx, cancel := context.WithTimeout(context.TODO(), time.Second*10)
ctx, cancel := context.WithTimeout(context.TODO(), time.Second*3)
defer cancel()

return wait.PollUntilContextCancel(ctx, time.Second, true, func(ctx context.Context) (bool, error) {
return wait.PollUntilContextCancel(ctx, 500*time.Millisecond, true, func(ctx context.Context) (bool, error) {
if err := r.Client.Get(ctx, nameSpacedCNINode, oldCNINode); err != nil {
if errors.IsNotFound(err) {
return true, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const (
// OSLinux is the the linux Operating System
OSLinux = "linux"
// Node termination finalizer on CNINode CRD
NodeTerminationFinalizer = "node.k8s.aws.com/termination"
NodeTerminationFinalizer = "networking.k8s.aws/node-termination"
)

// EC2 Tags
Expand Down

0 comments on commit a9563f1

Please sign in to comment.