Skip to content
Draft
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions internal/controller/openlibertyapplication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,23 @@ func (r *ReconcileOpenLiberty) deletePVC(reqLogger logr.Logger, pvcName string,

func (r *ReconcileOpenLiberty) getContainerImageMetadata(reqLogger logr.Logger, olapp *openlibertyv1.OpenLibertyApplication, imageRef imagev1.DockerImageReference) (string, *runtime.RawExtension, error) {
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?

Copy link
Copy Markdown
Member Author

@kabicin kabicin Mar 18, 2026

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

globalPullSecretName := "pull-secret"
globalPullSecretNamespace := "openshift-config"
globalPullSecret := &corev1.Secret{}
globalPullSecret.Name = globalPullSecretName
globalPullSecret.Namespace = globalPullSecretNamespace
err := r.GetClient().Get(context.TODO(), types.NamespacedName{Name: globalPullSecretName, Namespace: globalPullSecretNamespace}, globalPullSecret)
if err == nil {
olappSecrets = append(olappSecrets, *globalPullSecret)
} else if !kerrors.IsNotFound(err) {
return "", nil, fmt.Errorf("Failed to get the OpenShift global pull secret: %v", err)
}
}

// check the CR-configured pull secrets
var pullSecret *corev1.Secret
if olapp.GetPullSecret() != nil {
pullSecretNames := oputils.DecodeStringToList(*olapp.GetPullSecret())
Expand Down