Browse Source

Use LoadKubeConfigAsync instead of LoadKubeConfig (#220)

pull/225/head
Simon Cropp 7 years ago
committed by GitHub
parent
commit
b3d12e6740
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Microsoft.Tye.Core/ValidateSecretStep.cs

2
src/Microsoft.Tye.Core/ValidateSecretStep.cs

@ -54,7 +54,7 @@ namespace Microsoft.Tye
var config = KubernetesClientConfiguration.BuildDefaultConfig(); var config = KubernetesClientConfiguration.BuildDefaultConfig();
// Workaround for https://github.com/kubernetes-client/csharp/issues/372 // Workaround for https://github.com/kubernetes-client/csharp/issues/372
var store = KubernetesClientConfiguration.LoadKubeConfig(); var store = await KubernetesClientConfiguration.LoadKubeConfigAsync();
var context = store.Contexts.Where(c => c.Name == config.CurrentContext).FirstOrDefault(); var context = store.Contexts.Where(c => c.Name == config.CurrentContext).FirstOrDefault();
config.Namespace ??= context?.ContextDetails?.Namespace; config.Namespace ??= context?.ContextDetails?.Namespace;

Loading…
Cancel
Save