File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
apps/kubernetes-provider/src Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ const POD_EPHEMERAL_STORAGE_SIZE_LIMIT = process.env.POD_EPHEMERAL_STORAGE_SIZE_
3838const POD_EPHEMERAL_STORAGE_SIZE_REQUEST = process . env . POD_EPHEMERAL_STORAGE_SIZE_REQUEST || "2Gi" ;
3939
4040const PRE_PULL_DISABLED = process . env . PRE_PULL_DISABLED === "true" ;
41+ const ADDITIONAL_PULL_SECRETS = process . env . ADDITIONAL_PULL_SECRETS ;
4142
4243const logger = new SimpleLogger ( `[${ NODE_NAME } ]` ) ;
4344logger . log ( `running in ${ RUNTIME_ENV } mode` ) ;
@@ -403,17 +404,22 @@ class KubernetesTaskOperations implements TaskOperations {
403404 }
404405
405406 get #defaultPodSpec( ) : Omit < k8s . V1PodSpec , "containers" > {
407+ const pullSecrets = [ "registry-trigger" , "registry-trigger-failover" ] ;
408+
409+ if ( ADDITIONAL_PULL_SECRETS ) {
410+ pullSecrets . push ( ...ADDITIONAL_PULL_SECRETS . split ( "," ) ) ;
411+ }
412+
413+ const imagePullSecrets = pullSecrets . map (
414+ ( name ) => ( { name } ) satisfies k8s . V1LocalObjectReference
415+ ) ;
416+
417+ console . log ( "imagePullSecrets" , imagePullSecrets ) ;
418+
406419 return {
407420 restartPolicy : "Never" ,
408421 automountServiceAccountToken : false ,
409- imagePullSecrets : [
410- {
411- name : "registry-trigger" ,
412- } ,
413- {
414- name : "registry-trigger-failover" ,
415- } ,
416- ] ,
422+ imagePullSecrets,
417423 nodeSelector : {
418424 nodetype : "worker" ,
419425 } ,
You can’t perform that action at this time.
0 commit comments