Fix missing namespace in OCI Repository Controller secret error
Include namespace in secret error message for better debugging context. The secret name was already present in the error, but namespace information was missing, making it harder to identify which secret in which namespace was not found. Signed-off-by: cappyzawa <cappyzawa@gmail.com>
This commit is contained in:
parent
3caf8f1db9
commit
4b18040e22
|
@ -936,7 +936,7 @@ func (r *OCIRepositoryReconciler) keychain(ctx context.Context, obj *sourcev1.OC
|
|||
if err != nil {
|
||||
r.eventLogf(ctx, obj, eventv1.EventTypeTrace, sourcev1.AuthenticationFailedReason,
|
||||
"auth secret '%s' not found", obj.Spec.SecretRef.Name)
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("failed to get secret '%s': %w", secretRef, err)
|
||||
}
|
||||
imagePullSecrets = append(imagePullSecrets, imagePullSecret)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue