Skip to content

Commit

Permalink
use correct git repo namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Somtochi Onyekwere <[email protected]>
  • Loading branch information
somtochiama committed Jan 27, 2022
1 parent 3c195fd commit d4bb1b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/imageupdateautomation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (r *ImageUpdateAutomationReconciler) Reconcile(ctx context.Context, req ctr
}
debuglog.Info("fetching git repository", "gitrepository", originName)

if r.NoCrossNamespaceRef && auto.Spec.SourceRef.Namespace != auto.GetNamespace() {
if r.NoCrossNamespaceRef && gitRepoNamespace != auto.GetNamespace() {
err := acl.AccessDeniedError(fmt.Sprintf("can't access '%s/%s', cross-namespace references have been blocked",
auto.Spec.SourceRef.Kind, originName))
log.Error(err, "access denied to cross-namespaced resource")
Expand Down

0 comments on commit d4bb1b0

Please sign in to comment.