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

Run taint removal only if Kubernetes API is available #2015

Merged
merged 1 commit into from
Apr 22, 2024
Merged
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
12 changes: 7 additions & 5 deletions pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ func NewNodeService(o *Options, md metadata.MetadataService, m mounter.Mounter,
region := os.Getenv("AWS_REGION")
klog.InfoS("regionFromSession Node service", "region", region)

// Remove taint from node to indicate driver startup success
// This is done at the last possible moment to prevent race conditions or false positive removals
time.AfterFunc(taintRemovalInitialDelay, func() {
removeTaintInBackground(k, taintRemovalBackoff, removeNotReadyTaint)
})
if k != nil {
// Remove taint from node to indicate driver startup success
// This is done at the last possible moment to prevent race conditions or false positive removals
time.AfterFunc(taintRemovalInitialDelay, func() {
removeTaintInBackground(k, taintRemovalBackoff, removeNotReadyTaint)
})
}

return &NodeService{
metadata: md,
Expand Down
Loading