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

KubernetesClientConfiguration.BuildConfigFromConfigFile with ExternalExecution deadlocks waiting for exit #1542

Closed
thejuan opened this issue Mar 27, 2024 · 2 comments

Comments

@thejuan
Copy link

thejuan commented Mar 27, 2024

Describe the bug
KubernetesClientConfiguration.ExecuteExternalCommand causes a deadlock by waiting on the process before reading the Standard Output Stream this means the timeout occurs when the command actually completed successfully.

Kubernetes C# SDK Client Version
13.0.11

Dotnet Runtime Version
net8

To Reproduce
Call KubernetesClientConfiguration.BuildConfigFromConfigFile() using a config like below that relies on executing a plugin to authenticate. If the response payload is big enough the command will timeout. If you debug before the wait and manually evaluate the standard output stream with ReadToEnd, you'll see the command succeeds

KubeConfig

contexts:
- context:
    cluster: my-cluster
    user: oidc-prod
users:
- name: oidc-prod
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
      - oidc-login
      - get-token
      - --oidc-issuer-url=https://sso-url
      - --oidc-client-id=k8s-clusters-prod
      - --oidc-client-secret=my-secret
      command: kubectl
      env: null
      interactiveMode: IfAvailable
      provideClusterInfo: false

Where do you run your app with Kubernetes SDK (please complete the following information):

  • OS: Windows 11
@thejuan thejuan changed the title KubernetesClientConfiguration.BuildConfigFromConfigFile with ExternalExecution incorrectly times out waiting for exit KubernetesClientConfiguration.BuildConfigFromConfigFile with ExternalExecution deadlocks waiting for exit Mar 27, 2024
@tg123
Copy link
Member

tg123 commented Mar 28, 2024

#1457 did you try latest version?

@thejuan
Copy link
Author

thejuan commented Mar 28, 2024

Oops, no. Sorry, all works

@thejuan thejuan closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants