Skip to content

Commit f2e97dd

Browse files
author
Moritz Clasmeier
committed
Invoke pull secret patching before deploying
1 parent bc2bd99 commit f2e97dd

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

internal/deployer/deployer.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ func New(log *logger.Logger) (*Deployer, error) {
274274
return nil, fmt.Errorf("creating new Kubernetes client: %w", err)
275275
}
276276
d.k8sClient = client
277-
278277
}
279278

280279
log.Success("🚀 ACS Deployer initialized")
@@ -320,6 +319,17 @@ func (d *Deployer) Deploy(ctx context.Context, components component.Component) e
320319

321320
d.logger.Infof("Initiating deployment of %s", components)
322321

322+
if d.config.Roxie.KonfluxImages && d.config.Roxie.ClusterType == types.ClusterTypeOpenShift4 {
323+
// For deploying Konflux-built images, we need to configure image-rewriting on the cluster at the CRI-O level.
324+
// But due to https://access.redhat.com/solutions/6540591 the standard pull-secret mechanism doesn't work for the
325+
// target image references. A workaround is to inject the pull secrets we need into OpenShift's global
326+
// pull secrets.
327+
// Infra OpenShift4 clusters already come equipped with this global pull secret.
328+
if err := d.InjectGlobalOpenShiftPullSecret(ctx); err != nil {
329+
return fmt.Errorf("injecting global OpenShift pull-secret for Konflux images: %w", err)
330+
}
331+
}
332+
323333
// If only deploying operator, use the operator-only flow.
324334
if components.IncludesOperatorExplicitly() {
325335
return d.deployOperatorOnly(ctx)

0 commit comments

Comments
 (0)