1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

rename package: d4f --> breaker (#10863)

* rename package: d4f --> breaker

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* rename package: d4f --> breaker

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

---------

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
This commit is contained in:
Jim Bugwadia 2024-08-15 03:53:20 -07:00 committed by GitHub
parent 90be7c40fa
commit 2e39e27102
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 13 additions and 13 deletions

View file

@ -13,6 +13,7 @@ import (
"github.com/go-logr/logr"
"github.com/kyverno/kyverno/cmd/internal"
"github.com/kyverno/kyverno/pkg/auth/checker"
"github.com/kyverno/kyverno/pkg/breaker"
"github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernoinformer "github.com/kyverno/kyverno/pkg/client/informers/externalversions"
"github.com/kyverno/kyverno/pkg/clients/dclient"
@ -25,7 +26,6 @@ import (
policycachecontroller "github.com/kyverno/kyverno/pkg/controllers/policycache"
vapcontroller "github.com/kyverno/kyverno/pkg/controllers/validatingadmissionpolicy-generate"
webhookcontroller "github.com/kyverno/kyverno/pkg/controllers/webhook"
"github.com/kyverno/kyverno/pkg/d4f"
"github.com/kyverno/kyverno/pkg/engine/apicall"
"github.com/kyverno/kyverno/pkg/event"
"github.com/kyverno/kyverno/pkg/globalcontext/store"
@ -522,7 +522,7 @@ func main() {
setup.Logger.Error(errors.New("failed to start admission reports watcher"), "failed to start admission reports watcher")
os.Exit(1)
}
reportsBreaker := d4f.NewBreaker("admission reports", func(context.Context) bool {
reportsBreaker := breaker.NewBreaker("admission reports", func(context.Context) bool {
count, isRunning := ephrs.Count()
if !isRunning {
return true

View file

@ -1,4 +1,4 @@
package d4f
package breaker
import (
"context"

View file

@ -1,4 +1,4 @@
package d4f
package breaker
import (
"context"

View file

@ -11,13 +11,13 @@ import (
"github.com/alitto/pond"
"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/pkg/breaker"
"github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernov1informers "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1"
kyvernov1listers "github.com/kyverno/kyverno/pkg/client/listers/kyverno/v1"
kyvernov2listers "github.com/kyverno/kyverno/pkg/client/listers/kyverno/v2"
"github.com/kyverno/kyverno/pkg/clients/dclient"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/d4f"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
"github.com/kyverno/kyverno/pkg/engine/jmespath"
"github.com/kyverno/kyverno/pkg/engine/policycontext"
@ -64,7 +64,7 @@ type resourceHandlers struct {
admissionReports bool
backgroundServiceAccountName string
auditPool *pond.WorkerPool
reportsBreaker d4f.Breaker
reportsBreaker breaker.Breaker
}
func NewHandlers(
@ -85,7 +85,7 @@ func NewHandlers(
jp jmespath.Interface,
maxAuditWorkers int,
maxAuditCapacity int,
reportsBreaker d4f.Breaker,
reportsBreaker breaker.Breaker,
) webhooks.ResourceHandlers {
return &resourceHandlers{
engine: engine,

View file

@ -7,9 +7,9 @@ import (
"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/pkg/breaker"
"github.com/kyverno/kyverno/pkg/client/clientset/versioned"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/d4f"
"github.com/kyverno/kyverno/pkg/engine"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
"github.com/kyverno/kyverno/pkg/engine/mutate/patch"
@ -40,7 +40,7 @@ type imageVerificationHandler struct {
admissionReports bool
cfg config.Configuration
nsLister corev1listers.NamespaceLister
reportsBreaker d4f.Breaker
reportsBreaker breaker.Breaker
}
func NewImageVerificationHandler(
@ -51,7 +51,7 @@ func NewImageVerificationHandler(
admissionReports bool,
cfg config.Configuration,
nsLister corev1listers.NamespaceLister,
reportsBreaker d4f.Breaker,
reportsBreaker breaker.Breaker,
) ImageVerificationHandler {
return &imageVerificationHandler{
kyvernoClient: kyvernoClient,

View file

@ -7,9 +7,9 @@ import (
"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/pkg/breaker"
"github.com/kyverno/kyverno/pkg/client/clientset/versioned"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/d4f"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
"github.com/kyverno/kyverno/pkg/engine/policycontext"
"github.com/kyverno/kyverno/pkg/event"
@ -46,7 +46,7 @@ func NewValidationHandler(
metrics metrics.MetricsConfigManager,
cfg config.Configuration,
nsLister corev1listers.NamespaceLister,
reportsBreaker d4f.Breaker,
reportsBreaker breaker.Breaker,
) ValidationHandler {
return &validationHandler{
log: log,
@ -74,7 +74,7 @@ type validationHandler struct {
metrics metrics.MetricsConfigManager
cfg config.Configuration
nsLister corev1listers.NamespaceLister
reportsBreaker d4f.Breaker
reportsBreaker breaker.Breaker
}
func (v *validationHandler) HandleValidationEnforce(