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 {
149149 ] ;
150150 }
151151
152- public loadFromCluster ( ) {
152+ public loadFromCluster ( pathPrefix : string = '' ) {
153153 const host = process . env . KUBERNETES_SERVICE_HOST ;
154154 const port = process . env . KUBERNETES_SERVICE_PORT ;
155155 const clusterName = 'inCluster' ;
@@ -164,7 +164,7 @@ export class KubeConfig {
164164 this . clusters = [
165165 {
166166 name : clusterName ,
167- caFile : Config . SERVICEACCOUNT_CA_PATH ,
167+ caFile : ` ${ pathPrefix } ${ Config . SERVICEACCOUNT_CA_PATH } ` ,
168168 caData : null ,
169169 server : `${ scheme } ://${ host } :${ port } ` ,
170170 skipTLSVerify : false ,
@@ -173,7 +173,7 @@ export class KubeConfig {
173173 this . users = [
174174 {
175175 name : userName ,
176- token : fs . readFileSync ( Config . SERVICEACCOUNT_TOKEN_PATH ) . toString ( ) ,
176+ token : fs . readFileSync ( ` ${ pathPrefix } ${ Config . SERVICEACCOUNT_TOKEN_PATH } ` ) . toString ( ) ,
177177 // empty defaults, fields are required...
178178 certData : null ,
179179 certFile : null ,
You can’t perform that action at this time.
0 commit comments