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:"
This commit is contained in:
David Robson
2020-01-06 12:44:16 -08:00
committed by Kubernetes Prow Robot
parent 03491df7fa
commit 3c3c6cab91

View File

@@ -8,7 +8,7 @@ namespace k8s
{
private static string ServiceAccountPath =
Path.Combine(new string[] {
"var", "run", "secrets", "kubernetes.io", "serviceaccount/"
$"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount"
});
private const string ServiceAccountTokenKeyFileName = "token";
private const string ServiceAccountRootCAKeyFileName = "ca.crt";