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:
parent
5243763674
commit
a6d4cd186d
3 changed files with 9 additions and 5 deletions
|
@ -55,3 +55,7 @@ linters-settings:
|
||||||
alias: $1$2
|
alias: $1$2
|
||||||
- pkg: github.com/kyverno/kyverno/pkg/dclient
|
- pkg: github.com/kyverno/kyverno/pkg/dclient
|
||||||
alias: dclient
|
alias: dclient
|
||||||
|
- pkg: github.com/kyverno/kyverno/pkg/client/clientset/versioned
|
||||||
|
alias: kyvernoclient
|
||||||
|
- pkg: k8s.io/client-go/kubernetes
|
||||||
|
alias: kubernetes
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-logr/logr"
|
"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/kyverno/kyverno/pkg/config"
|
||||||
"github.com/patrickmn/go-cache"
|
"github.com/patrickmn/go-cache"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -25,7 +25,7 @@ type creator interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type changeRequestCreator struct {
|
type changeRequestCreator struct {
|
||||||
client policyreportclient.Interface
|
client kyvernoclient.Interface
|
||||||
|
|
||||||
// addCache preserves requests that are to be added to report
|
// addCache preserves requests that are to be added to report
|
||||||
RCRCache *cache.Cache
|
RCRCache *cache.Cache
|
||||||
|
@ -41,7 +41,7 @@ type changeRequestCreator struct {
|
||||||
log logr.Logger
|
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{
|
return &changeRequestCreator{
|
||||||
client: client,
|
client: client,
|
||||||
RCRCache: cache.New(0, 24*time.Hour),
|
RCRCache: cache.New(0, 24*time.Hour),
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
"github.com/go-logr/logr"
|
"github.com/go-logr/logr"
|
||||||
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
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"
|
kyvernoinformer "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1"
|
||||||
requestinformer "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1alpha2"
|
requestinformer "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1alpha2"
|
||||||
kyvernolister "github.com/kyverno/kyverno/pkg/client/listers/kyverno/v1"
|
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
|
// NewReportChangeRequestGenerator returns a new instance of report request generator
|
||||||
func NewReportChangeRequestGenerator(client policyreportclient.Interface,
|
func NewReportChangeRequestGenerator(client kyvernoclient.Interface,
|
||||||
dclient dclient.Interface,
|
dclient dclient.Interface,
|
||||||
reportReqInformer requestinformer.ReportChangeRequestInformer,
|
reportReqInformer requestinformer.ReportChangeRequestInformer,
|
||||||
clusterReportReqInformer requestinformer.ClusterReportChangeRequestInformer,
|
clusterReportReqInformer requestinformer.ClusterReportChangeRequestInformer,
|
||||||
|
|
Loading…
Reference in a new issue