Skip to content

Add OCP global pull secret in image version checks#848

Draft
kabicin wants to merge 6 commits into
mainfrom
global-ps-lib-version
Draft

Add OCP global pull secret in image version checks#848
kabicin wants to merge 6 commits into
mainfrom
global-ps-lib-version

Conversation

@kabicin

@kabicin kabicin commented Mar 18, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it?:

Does this PR introduce a user-facing change?

  • User guide
  • CHANGELOG.md

Which issue(s) this PR fixes:

Fixes #

@leochr leochr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kabicin Thanks for the PR. Added few questions.

olappSecrets := []corev1.Secret{}

// check the OpenShift global pull secret for inclusion
if len(r.watchNamespaces) == 0 && r.IsOpenShift() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the IsClusterWide util method be used instead?

@kabicin kabicin Mar 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added isClusterWide to the ReconcileOpenLiberty

}
}
}
return libertyimage.NewNamespaceCredentialsContext(reqLogger, olappSecrets, olapp.GetNamespace()).GetContainerImageMetadata(context.TODO(), imageRef, pullSecret, false)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed that the pullSecret would be the last secret if multiple pull secrets were specified. Would that be okay?

@kabicin kabicin Mar 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order matters on registry collisions (execute first seen registry first) so I can prioritize the CR-specific pull secrets before the global one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pre-GA 1.6.0: image pull errros in the operator status

2 participants