From 06380095b46bc20463cf39d59e15fd5f69850a51 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Thu, 19 Dec 2019 16:45:32 -0800 Subject: [PATCH] Remove forward slashes from paths. (#323) --- .../KubernetesClientConfiguration.InCluster.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/KubernetesClient/KubernetesClientConfiguration.InCluster.cs b/src/KubernetesClient/KubernetesClientConfiguration.InCluster.cs index 7fa4674..e48f94e 100644 --- a/src/KubernetesClient/KubernetesClientConfiguration.InCluster.cs +++ b/src/KubernetesClient/KubernetesClientConfiguration.InCluster.cs @@ -6,7 +6,10 @@ namespace k8s { public partial class KubernetesClientConfiguration { - private const string ServiceAccountPath = "/var/run/secrets/kubernetes.io/serviceaccount/"; + private static string ServiceAccountPath = + Path.Combine(new string[] { + "var", "run", "secrets", "kubernetes.io", "serviceaccount/" + }); private const string ServiceAccountTokenKeyFileName = "token"; private const string ServiceAccountRootCAKeyFileName = "ca.crt";