mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 07:26:55 +00:00
fix: update CLI to use store for fetching regclient (#9345)
* fix: update CLI to use store for fetching regclient Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: nil Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: pass the rclient Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
This commit is contained in:
parent
42a6b4b545
commit
8a13ec1bba
1 changed files with 5 additions and 1 deletions
|
@ -125,6 +125,10 @@ func runTest(out io.Writer, testCase test.TestCase, auditWarn bool) ([]engineapi
|
|||
}
|
||||
validPolicies = append(validPolicies, pol)
|
||||
}
|
||||
rclient := store.GetRegistryClient()
|
||||
if rclient == nil {
|
||||
rclient = registryclient.NewOrDie()
|
||||
}
|
||||
// execute engine
|
||||
var engineResponses []engineapi.EngineResponse
|
||||
var resultCounts processor.ResultCounts
|
||||
|
@ -142,7 +146,7 @@ func runTest(out io.Writer, testCase test.TestCase, auditWarn bool) ([]engineapi
|
|||
Client: dClient,
|
||||
Subresources: vars.Subresources(),
|
||||
Out: out,
|
||||
RegistryClient: registryclient.NewOrDie(),
|
||||
RegistryClient: rclient,
|
||||
}
|
||||
ers, err := processor.ApplyPoliciesOnResource()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue