Skip to content

Commit 3c3c6ca

Browse files
darobsk8s-ci-robot
authored andcommitted
Use Path.DirectorySeparatorChar to have ServiceAccountPath start from root, instead of a relative path. (#342)
This should work fine on Linux containers, but it still assumes the Windows container working drive is "C:"
1 parent 03491df commit 3c3c6ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/KubernetesClient/KubernetesClientConfiguration.InCluster.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public partial class KubernetesClientConfiguration
88
{
99
private static string ServiceAccountPath =
1010
Path.Combine(new string[] {
11-
"var", "run", "secrets", "kubernetes.io", "serviceaccount/"
11+
$"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount"
1212
});
1313
private const string ServiceAccountTokenKeyFileName = "token";
1414
private const string ServiceAccountRootCAKeyFileName = "ca.crt";

0 commit comments

Comments
 (0)