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

k8s: fix concurrent kubeconfig access when loading nodes #2497

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Jun 3, 2024

fixes #2436

Addresses a concurrency issue in the ConfigFromEndpoint function where multiple kubeconfig files were accessed simultaneously when loading nodes. This change ensures that kubeconfig files are accessed in a thread-safe manner by making config from the endpoint taking precedence, preventing potential race conditions.

cc @gitfxx

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@gitfxx
Copy link

gitfxx commented Jun 4, 2024

@crazy-max I tested, and there are no issues.

@crazy-max crazy-max marked this pull request as ready for review June 4, 2024 07:20
name: test
current-context: test
name: k3s
current-context: k3s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crazy-max crazy-max merged commit 747b75a into docker:master Jun 4, 2024
102 checks passed
@crazy-max crazy-max deleted the fix-k8s-kubeconfig branch June 4, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The kubeconfig environment variable is sometimes not correctly referenced
3 participants