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

chore: make clients import aliases consistent (#3956)

* chore: make kyverno api import aliases consistent

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

* chore: make apimachinery api import aliases consistent

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

* chore: make dclient api import aliases consistent

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

* chore: make clients import aliases consistent

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-05-17 17:26:32 +02:00 committed by GitHub
parent 5243763674
commit a6d4cd186d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View file

@ -55,3 +55,7 @@ linters-settings:
alias: $1$2
- pkg: github.com/kyverno/kyverno/pkg/dclient
alias: dclient
- pkg: github.com/kyverno/kyverno/pkg/client/clientset/versioned
alias: kyvernoclient
- pkg: k8s.io/client-go/kubernetes
alias: kubernetes

View file

@ -9,7 +9,7 @@ import (
"time"
"github.com/go-logr/logr"
policyreportclient "github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernoclient "github.com/kyverno/kyverno/pkg/client/clientset/versioned"
"github.com/kyverno/kyverno/pkg/config"
"github.com/patrickmn/go-cache"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -25,7 +25,7 @@ type creator interface {
}
type changeRequestCreator struct {
client policyreportclient.Interface
client kyvernoclient.Interface
// addCache preserves requests that are to be added to report
RCRCache *cache.Cache
@ -41,7 +41,7 @@ type changeRequestCreator struct {
log logr.Logger
}
func newChangeRequestCreator(client policyreportclient.Interface, tickerInterval time.Duration, log logr.Logger) creator {
func newChangeRequestCreator(client kyvernoclient.Interface, tickerInterval time.Duration, log logr.Logger) creator {
return &changeRequestCreator{
client: client,
RCRCache: cache.New(0, 24*time.Hour),

View file

@ -10,7 +10,7 @@ import (
"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
policyreportclient "github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernoclient "github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernoinformer "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1"
requestinformer "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1alpha2"
kyvernolister "github.com/kyverno/kyverno/pkg/client/listers/kyverno/v1"
@ -50,7 +50,7 @@ type Generator struct {
}
// NewReportChangeRequestGenerator returns a new instance of report request generator
func NewReportChangeRequestGenerator(client policyreportclient.Interface,
func NewReportChangeRequestGenerator(client kyvernoclient.Interface,
dclient dclient.Interface,
reportReqInformer requestinformer.ReportChangeRequestInformer,
clusterReportReqInformer requestinformer.ClusterReportChangeRequestInformer,