File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export class KubeConfig {
149
149
] ;
150
150
}
151
151
152
- public loadFromCluster ( ) {
152
+ public loadFromCluster ( pathPrefix : string = '' ) {
153
153
const host = process . env . KUBERNETES_SERVICE_HOST ;
154
154
const port = process . env . KUBERNETES_SERVICE_PORT ;
155
155
const clusterName = 'inCluster' ;
@@ -164,7 +164,7 @@ export class KubeConfig {
164
164
this . clusters = [
165
165
{
166
166
name : clusterName ,
167
- caFile : Config . SERVICEACCOUNT_CA_PATH ,
167
+ caFile : ` ${ pathPrefix } ${ Config . SERVICEACCOUNT_CA_PATH } ` ,
168
168
caData : null ,
169
169
server : `${ scheme } ://${ host } :${ port } ` ,
170
170
skipTLSVerify : false ,
@@ -173,7 +173,7 @@ export class KubeConfig {
173
173
this . users = [
174
174
{
175
175
name : userName ,
176
- token : fs . readFileSync ( Config . SERVICEACCOUNT_TOKEN_PATH ) . toString ( ) ,
176
+ token : fs . readFileSync ( ` ${ pathPrefix } ${ Config . SERVICEACCOUNT_TOKEN_PATH } ` ) . toString ( ) ,
177
177
// empty defaults, fields are required...
178
178
certData : null ,
179
179
certFile : null ,
You can’t perform that action at this time.
0 commit comments