Skip to content

Fix kube servers not deleting when dynamic kube clusters are deleted#61642

Merged
atburke merged 1 commit intomasterfrom
atburke/kube-dynamic-delete
Nov 24, 2025
Merged

Fix kube servers not deleting when dynamic kube clusters are deleted#61642
atburke merged 1 commit intomasterfrom
atburke/kube-dynamic-delete

Conversation

@atburke
Copy link
Copy Markdown
Contributor

@atburke atburke commented Nov 20, 2025

This change fixes a bug where deleting a dynamic kube_cluster resource would not delete the associated kube_server resource.

Fixes #52966.

Changelog: Fixed tsh kube ls showing deleted clusters

Test Plan

  • Create a kube_cluster resource and check that it appears with tsh kube ls. Delete the resource and check that it no longer appears with tsh kube ls.

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from nklaassen November 24, 2025 11:19
@atburke atburke added this pull request to the merge queue Nov 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 24, 2025
@atburke atburke added this pull request to the merge queue Nov 24, 2025
Merged via the queue into master with commit c0f0f57 Nov 24, 2025
47 checks passed
@atburke atburke deleted the atburke/kube-dynamic-delete branch November 24, 2025 15:54
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@atburke See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

tigrato added a commit that referenced this pull request Dec 11, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
tigrato added a commit that referenced this pull request Dec 12, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
backport-bot-workflows bot pushed a commit that referenced this pull request Dec 12, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
tigrato added a commit that referenced this pull request Dec 12, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2025
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
21KennethTran pushed a commit that referenced this pull request Jan 6, 2026
This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
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.

Kubernetes cluster not removing automatically with eks auto-discovery

3 participants