diff --git a/pkg/run/run.go b/pkg/run/run.go index f58f5ae6..14a36df5 100644 --- a/pkg/run/run.go +++ b/pkg/run/run.go @@ -140,7 +140,7 @@ func NewCmdRun() *cobra.Command { cmd.Flags().StringVar(&o.mode, "mode", defaultRunMode, "Run mode: Availble: regular, upgrade") cmd.Flags().StringVar(&o.upgradeImage, "upgrade-to-image", defaultUpgradeImage, "Target OpenShift Release Image. Example: oc adm release info 4.11.18 -o jsonpath={.image}") cmd.Flags().StringArrayVar(o.plugins, "plugin", nil, "Override default conformance plugins to use. Can be used multiple times. (default plugins can be reviewed with assets subcommand)") - cmd.Flags().StringVar(&o.sonobuoyImage, "sonobuoy-image", fmt.Sprintf("%s/sonobuoy:%s", pkg.DefaultToolsRepository, buildinfo.Version), "Image override for the Sonobuoy worker and aggregator") + cmd.Flags().StringVar(&o.sonobuoyImage, "sonobuoy-image", fmt.Sprintf("%s:%s", pkg.SonobuoyMirrorRepository, buildinfo.Version), "Image override for the Sonobuoy worker and aggregator") cmd.Flags().StringVar(&o.PluginsImage, "plugins-image", pkg.PluginsImage, "Image containing plugins to be executed.") cmd.Flags().StringVar(&o.imageRepository, "image-repository", "", "Image repository containing required images test environment. Example: openshift-provider-cert-tool --mirror-repository mirror.repository.net/ocp-cert") cmd.Flags().IntVar(&o.timeout, "timeout", defaultRunTimeoutSeconds, "Execution timeout in seconds") @@ -363,7 +363,9 @@ func (r *RunOptions) Run(kclient kubernetes.Interface, sclient sonobuoyclient.In imageRepository = r.imageRepository log.Infof("Mirror registry is configured %s ", r.imageRepository) } - r.sonobuoyImage = fmt.Sprintf("%s/sonobuoy:%s", imageRepository, buildinfo.Version) + if imageRepository != pkg.DefaultToolsRepository { + r.sonobuoyImage = fmt.Sprintf("%s/sonobuoy:%s", imageRepository, buildinfo.Version) + } r.PluginsImage = fmt.Sprintf("%s/%s", imageRepository, r.PluginsImage) // Let Sonobuoy do some preflight checks before we run diff --git a/pkg/types.go b/pkg/types.go index a769f4f2..5e9e7e32 100644 --- a/pkg/types.go +++ b/pkg/types.go @@ -13,7 +13,8 @@ const ( SonobuoyLabelComponentName = "component" SonobuoyLabelComponentValue = "sonobuoy" DefaultToolsRepository = "quay.io/ocp-cert" - PluginsImage = "openshift-tests-provider-cert:v0.5.0-beta0" + SonobuoyMirrorRepository = "quay.io/opct/sonobuoy" + PluginsImage = "openshift-tests-provider-cert:v0.5.0-alpha.3" ) var (