mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
688b4fb8e3
* add package logger in files Signed-off-by: damilola olayinka <holayinkajr@gmail.com> * add package logger to initContainer and other files Signed-off-by: damilola olayinka <holayinkajr@gmail.com> * helm docs Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> * helm default values Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> * release notes Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Signed-off-by: damilola olayinka <holayinkajr@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
23 lines
654 B
Go
23 lines
654 B
Go
package generate
|
|
|
|
import (
|
|
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
|
"github.com/kyverno/kyverno/pkg/logging"
|
|
"github.com/kyverno/kyverno/pkg/policy/generate/fake"
|
|
)
|
|
|
|
// FakeGenerate provides implementation for generate rule processing
|
|
// with mocks/fakes for cluster interactions
|
|
type FakeGenerate struct {
|
|
Generate
|
|
}
|
|
|
|
// NewFakeGenerate returns a new instance of generatecheck that uses
|
|
// fake/mock implementation for operation access(always returns true)
|
|
func NewFakeGenerate(rule kyvernov1.Generation) *FakeGenerate {
|
|
g := FakeGenerate{}
|
|
g.rule = rule
|
|
g.authCheck = fake.NewFakeAuth()
|
|
g.log = logging.GlobalLogger()
|
|
return &g
|
|
}
|