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:
cappyzawa 2025-07-23 21:18:19 +09:00
parent 3caf8f1db9
commit 4b18040e22
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}