Skip to content

Commit 2bea10c

Browse files
authored
Merge pull request #1568 from omerlh/fix/service-account-custom-path
fix: use load from cluster when default service mount is disabled
2 parents d3a9151 + 416a2d7 commit 2bea10c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ export class KubeConfig {
369369
}
370370
}
371371

372-
if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) {
372+
if (
373+
fileExists(Config.SERVICEACCOUNT_TOKEN_PATH) ||
374+
(process.env.TOKEN_FILE_PATH !== undefined && process.env.TOKEN_FILE_PATH !== '')
375+
) {
373376
this.loadFromCluster();
374377
return;
375378
}

0 commit comments

Comments
 (0)