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_
38
38
const POD_EPHEMERAL_STORAGE_SIZE_REQUEST = process . env . POD_EPHEMERAL_STORAGE_SIZE_REQUEST || "2Gi" ;
39
39
40
40
const PRE_PULL_DISABLED = process . env . PRE_PULL_DISABLED === "true" ;
41
+ const ADDITIONAL_PULL_SECRETS = process . env . ADDITIONAL_PULL_SECRETS ;
41
42
42
43
const logger = new SimpleLogger ( `[${ NODE_NAME } ]` ) ;
43
44
logger . log ( `running in ${ RUNTIME_ENV } mode` ) ;
@@ -403,17 +404,22 @@ class KubernetesTaskOperations implements TaskOperations {
403
404
}
404
405
405
406
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
+
406
419
return {
407
420
restartPolicy : "Never" ,
408
421
automountServiceAccountToken : false ,
409
- imagePullSecrets : [
410
- {
411
- name : "registry-trigger" ,
412
- } ,
413
- {
414
- name : "registry-trigger-failover" ,
415
- } ,
416
- ] ,
422
+ imagePullSecrets,
417
423
nodeSelector : {
418
424
nodetype : "worker" ,
419
425
} ,
You can’t perform that action at this time.
0 commit comments