Skip to content

Commit

Permalink
fix: avoid error for missing image if pod is provided (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurokobo authored May 20, 2023
1 parent 81e3e00 commit e3108db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/workceptor/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ func (cfg KubeWorkerCfg) Prepare() error {
if cfg.Pod != "" && (cfg.Image != "" || cfg.Command != "" || cfg.Params != "") {
return fmt.Errorf("can only provide Pod when Image, Command, and Params are empty")
}
if cfg.Image == "" && !cfg.AllowRuntimeCommand && !cfg.AllowRuntimePod {
if cfg.Pod == "" && cfg.Image == "" && !cfg.AllowRuntimeCommand && !cfg.AllowRuntimePod {
return fmt.Errorf("must specify a container image to run")
}
method := strings.ToLower(cfg.StreamMethod)
Expand Down

0 comments on commit e3108db

Please sign in to comment.