File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const Env = z.object({
4242 DOCKER_NETWORK : z . string ( ) . default ( "host" ) ,
4343 OTEL_EXPORTER_OTLP_ENDPOINT : z . string ( ) . url ( ) ,
4444 ENFORCE_MACHINE_PRESETS : z . coerce . boolean ( ) . default ( false ) ,
45+ KUBERNETES_IMAGE_PULL_SECRETS : z . string ( ) . optional ( ) , // csv
4546
4647 // Used by the resource monitor
4748 OVERRIDE_CPU_TOTAL : z . coerce . number ( ) . optional ( ) ,
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ class ManagedSupervisor {
9797 workloadApiDomain,
9898 workloadApiPort : workloadApiPortExternal ,
9999 warmStartUrl : this . warmStartUrl ,
100+ imagePullSecrets : env . KUBERNETES_IMAGE_PULL_SECRETS ?. split ( "," ) ,
100101 } ) ;
101102 } else {
102103 this . resourceMonitor = new DockerResourceMonitor ( new Docker ( ) ) ;
Original file line number Diff line number Diff line change @@ -182,18 +182,15 @@ export class KubernetesWorkloadManager implements WorkloadManager {
182182 }
183183 }
184184
185+ private getImagePullSecrets ( ) : k8s . V1LocalObjectReference [ ] | undefined {
186+ return this . opts . imagePullSecrets ?. map ( ( name ) => ( { name } ) ) ;
187+ }
188+
185189 get #defaultPodSpec( ) : Omit < k8s . V1PodSpec , "containers" > {
186190 return {
187191 restartPolicy : "Never" ,
188192 automountServiceAccountToken : false ,
189- imagePullSecrets : [
190- {
191- name : "registry-trigger" ,
192- } ,
193- {
194- name : "registry-trigger-failover" ,
195- } ,
196- ] ,
193+ imagePullSecrets : this . getImagePullSecrets ( ) ,
197194 nodeSelector : {
198195 nodetype : "worker-re2" ,
199196 } ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export interface WorkloadManagerOptions {
55 workloadApiDomain ?: string ; // If unset, will use orchestrator-specific default
66 workloadApiPort : number ;
77 warmStartUrl ?: string ;
8+ imagePullSecrets ?: string [ ] ;
89}
910
1011export interface WorkloadManager {
You can’t perform that action at this time.
0 commit comments