From b6209da1087b2df6a3761ecd6c1bd98d9900e195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Mon, 12 Jun 2023 18:03:17 +0200 Subject: [PATCH] fix: use RawClient in context loader (#7499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- cmd/cli/kubectl-kyverno/utils/store/contextloader.go | 2 +- pkg/engine/api/contextloader.go | 6 +++--- pkg/engine/test/contextloader.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/cli/kubectl-kyverno/utils/store/contextloader.go b/cmd/cli/kubectl-kyverno/utils/store/contextloader.go index e291120b62..54b401be3c 100644 --- a/cmd/cli/kubectl-kyverno/utils/store/contextloader.go +++ b/cmd/cli/kubectl-kyverno/utils/store/contextloader.go @@ -38,7 +38,7 @@ type mockContextLoader struct { func (l *mockContextLoader) Load( ctx context.Context, jp jmespath.Interface, - client engineapi.Client, + client engineapi.RawClient, _ registryclient.Client, contextEntries []kyvernov1.ContextEntry, jsonContext enginecontext.Interface, diff --git a/pkg/engine/api/contextloader.go b/pkg/engine/api/contextloader.go index c6f78c974e..be944cc79e 100644 --- a/pkg/engine/api/contextloader.go +++ b/pkg/engine/api/contextloader.go @@ -20,7 +20,7 @@ type ContextLoader interface { Load( ctx context.Context, jp jmespath.Interface, - client Client, + client RawClient, rclient registryclient.Client, contextEntries []kyvernov1.ContextEntry, jsonContext enginecontext.Interface, @@ -46,7 +46,7 @@ type contextLoader struct { func (l *contextLoader) Load( ctx context.Context, jp jmespath.Interface, - client Client, + client RawClient, rclient registryclient.Client, contextEntries []kyvernov1.ContextEntry, jsonContext enginecontext.Interface, @@ -65,7 +65,7 @@ func (l *contextLoader) Load( func (l *contextLoader) newDeferredLoader( ctx context.Context, jp jmespath.Interface, - client Client, + client RawClient, rclient registryclient.Client, entry kyvernov1.ContextEntry, jsonContext enginecontext.Interface, diff --git a/pkg/engine/test/contextloader.go b/pkg/engine/test/contextloader.go index 042d57a061..f2cc3e7470 100644 --- a/pkg/engine/test/contextloader.go +++ b/pkg/engine/test/contextloader.go @@ -45,7 +45,7 @@ type mockContextLoader struct { func (l *mockContextLoader) Load( ctx context.Context, jp jmespath.Interface, - client engineapi.Client, + client engineapi.RawClient, rclient registryclient.Client, contextEntries []kyvernov1.ContextEntry, jsonContext enginecontext.Interface,