File tree 4 files changed +8
-8
lines changed
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({
42
42
DOCKER_NETWORK : z . string ( ) . default ( "host" ) ,
43
43
OTEL_EXPORTER_OTLP_ENDPOINT : z . string ( ) . url ( ) ,
44
44
ENFORCE_MACHINE_PRESETS : z . coerce . boolean ( ) . default ( false ) ,
45
+ KUBERNETES_IMAGE_PULL_SECRETS : z . string ( ) . optional ( ) , // csv
45
46
46
47
// Used by the resource monitor
47
48
OVERRIDE_CPU_TOTAL : z . coerce . number ( ) . optional ( ) ,
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ class ManagedSupervisor {
97
97
workloadApiDomain,
98
98
workloadApiPort : workloadApiPortExternal ,
99
99
warmStartUrl : this . warmStartUrl ,
100
+ imagePullSecrets : env . KUBERNETES_IMAGE_PULL_SECRETS ?. split ( "," ) ,
100
101
} ) ;
101
102
} else {
102
103
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 {
182
182
}
183
183
}
184
184
185
+ private getImagePullSecrets ( ) : k8s . V1LocalObjectReference [ ] | undefined {
186
+ return this . opts . imagePullSecrets ?. map ( ( name ) => ( { name } ) ) ;
187
+ }
188
+
185
189
get #defaultPodSpec( ) : Omit < k8s . V1PodSpec , "containers" > {
186
190
return {
187
191
restartPolicy : "Never" ,
188
192
automountServiceAccountToken : false ,
189
- imagePullSecrets : [
190
- {
191
- name : "registry-trigger" ,
192
- } ,
193
- {
194
- name : "registry-trigger-failover" ,
195
- } ,
196
- ] ,
193
+ imagePullSecrets : this . getImagePullSecrets ( ) ,
197
194
nodeSelector : {
198
195
nodetype : "worker-re2" ,
199
196
} ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export interface WorkloadManagerOptions {
5
5
workloadApiDomain ?: string ; // If unset, will use orchestrator-specific default
6
6
workloadApiPort : number ;
7
7
warmStartUrl ?: string ;
8
+ imagePullSecrets ?: string [ ] ;
8
9
}
9
10
10
11
export interface WorkloadManager {
You can’t perform that action at this time.
0 commit comments