@@ -70,11 +70,12 @@ type BenchmarkOptions struct {
7070
7171 extraArgs map [string ]string
7272
73- image string
74- cpuRequest string
75- cpuLimit string
76- memoryRequest string
77- memoryLimit string
73+ image string
74+ imagePullSecrets []string
75+ cpuRequest string
76+ cpuLimit string
77+ memoryRequest string
78+ memoryLimit string
7879
7980 wait bool
8081}
@@ -103,11 +104,12 @@ type BenchmarkConfig struct {
103104
104105 ExtraArgs map [string ]string `json:"extraArgs,omitempty"`
105106
106- Image string `json:"image,omitempty"`
107- CPURequest string `json:"cpuRequest,omitempty"`
108- CPULimit string `json:"cpuLimit,omitempty"`
109- MemoryRequest string `json:"memoryRequest,omitempty"`
110- MemoryLimit string `json:"memoryLimit,omitempty"`
107+ Image string `json:"image,omitempty"`
108+ ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
109+ CPURequest string `json:"cpuRequest,omitempty"`
110+ CPULimit string `json:"cpuLimit,omitempty"`
111+ MemoryRequest string `json:"memoryRequest,omitempty"`
112+ MemoryLimit string `json:"memoryLimit,omitempty"`
111113
112114 Wait * bool `json:"wait,omitempty"`
113115}
@@ -195,6 +197,7 @@ version management.`,
195197 "Defaults to the generated job name if not specified." )
196198
197199 cmd .Flags ().StringVar (& benchmarkOpts .image , "image" , benchmarkOpts .image , "Container image used for benchmark job" )
200+ cmd .Flags ().StringArrayVar (& benchmarkOpts .imagePullSecrets , "image-pull-secret" , nil , "Image pull secret names for private registries (can be specified multiple times)" )
198201 cmd .Flags ().StringVar (& benchmarkOpts .cpuRequest , "cpu-request" , benchmarkOpts .cpuRequest , "CPU request for benchmark pod" )
199202 cmd .Flags ().StringVar (& benchmarkOpts .cpuLimit , "cpu-limit" , benchmarkOpts .cpuLimit , "CPU limit for benchmark pod" )
200203 cmd .Flags ().StringVar (& benchmarkOpts .memoryRequest , "memory-request" , benchmarkOpts .memoryRequest , "Memory request for benchmark pod" )
@@ -262,7 +265,7 @@ func getConflictingFlags(cmd *cobra.Command) []string {
262265 "api-backend" , "api-base" , "api-port" , "api-key" , "api-model-name" ,
263266 "model-tokenizer" ,
264267 "experiment-base-dir" , "experiment-folder-name" ,
265- "image" , "cpu-request" , "cpu-limit" , "memory-request" , "memory-limit" ,
268+ "image" , "image-pull-secret" , " cpu-request" , "cpu-limit" , "memory-request" , "memory-limit" ,
266269 "wait" , "extra-args" ,
267270 }
268271 var conflicting []string
@@ -291,6 +294,7 @@ func applyConfigToOptions(cfg *BenchmarkConfig, cmd *cobra.Command) {
291294 setStringOpt (& benchmarkOpts .experimentBaseDir , cfg .ExperimentBaseDir , "experiment-base-dir" , cmd )
292295 setStringOpt (& benchmarkOpts .experimentFolderName , cfg .ExperimentFolderName , "experiment-folder-name" , cmd )
293296 setStringOpt (& benchmarkOpts .image , cfg .Image , "image" , cmd )
297+ setStringSliceOpt (& benchmarkOpts .imagePullSecrets , cfg .ImagePullSecrets , "image-pull-secret" , cmd )
294298 setStringOpt (& benchmarkOpts .cpuRequest , cfg .CPURequest , "cpu-request" , cmd )
295299 setStringOpt (& benchmarkOpts .cpuLimit , cfg .CPULimit , "cpu-limit" , cmd )
296300 setStringOpt (& benchmarkOpts .memoryRequest , cfg .MemoryRequest , "memory-request" , cmd )
0 commit comments