Skip to content

Commit

Permalink
OPCT-226: fix images to use multi-arch support
Browse files Browse the repository at this point in the history
Fix plugin and sonobuoy image to use multi-arch payloads hosted in the
mirrored repositories.
  • Loading branch information
mtulio committed Jul 24, 2024
1 parent ae887ab commit 67448e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkg/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pkg/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 67448e3

Please sign in to comment.