Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 1afde2c

Browse files
committed
Print subject access review error to logs.
Signed-off-by: Pavel Macík <[email protected]>
1 parent 771154a commit 1afde2c

File tree

1 file changed

+6
-1
lines changed
  • pkg/reconcile/pipeline/context

1 file changed

+6
-1
lines changed

pkg/reconcile/pipeline/context/impl.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
v1 "k8s.io/api/authorization/v1"
1919
clientauthzv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
2020
"k8s.io/client-go/util/workqueue"
21+
ctrl "sigs.k8s.io/controller-runtime"
2122

2223
"github.com/redhat-developer/service-binding-operator/pkg/converter"
2324
"github.com/redhat-developer/service-binding-operator/pkg/reconcile/pipeline"
@@ -33,7 +34,10 @@ import (
3334
"k8s.io/client-go/dynamic"
3435
)
3536

36-
var _ pipeline.Context = &bindingImpl{}
37+
var (
38+
_ pipeline.Context = &bindingImpl{}
39+
contextLog = ctrl.Log.WithName("pipeline-context")
40+
)
3741

3842
type impl struct {
3943
client dynamic.Interface
@@ -188,6 +192,7 @@ func (i *impl) canPerform(gvr *schema.GroupVersionResource, name string, namespa
188192
},
189193
}, metav1.CreateOptions{})
190194
if err != nil {
195+
contextLog.Error(err, "unable to review subject access")
191196
return false
192197
}
193198
return sar.Status.Allowed

0 commit comments

Comments
 (0)