Skip to content

Commit 4b18040

Browse files
committed
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 <[email protected]>
1 parent 3caf8f1 commit 4b18040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/controller/ocirepository_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ func (r *OCIRepositoryReconciler) keychain(ctx context.Context, obj *sourcev1.OC
936936
if err != nil {
937937
r.eventLogf(ctx, obj, eventv1.EventTypeTrace, sourcev1.AuthenticationFailedReason,
938938
"auth secret '%s' not found", obj.Spec.SecretRef.Name)
939-
return nil, err
939+
return nil, fmt.Errorf("failed to get secret '%s': %w", secretRef, err)
940940
}
941941
imagePullSecrets = append(imagePullSecrets, imagePullSecret)
942942
}

0 commit comments

Comments
 (0)