mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 07:26:55 +00:00
chore: bump codegen tools (#8038)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
78dfd297bb
commit
703b63d151
16 changed files with 84 additions and 98 deletions
4
Makefile
4
Makefile
|
@ -44,7 +44,7 @@ REGISTER_GEN := $(TOOLS_DIR)/register-gen
|
|||
DEEPCOPY_GEN := $(TOOLS_DIR)/deepcopy-gen
|
||||
DEFAULTER_GEN := $(TOOLS_DIR)/defaulter-gen
|
||||
APPLYCONFIGURATION_GEN := $(TOOLS_DIR)/applyconfiguration-gen
|
||||
CODE_GEN_VERSION := v0.26.3
|
||||
CODE_GEN_VERSION := v0.28.0
|
||||
GEN_CRD_API_REFERENCE_DOCS := $(TOOLS_DIR)/gen-crd-api-reference-docs
|
||||
GEN_CRD_API_REFERENCE_DOCS_VERSION := latest
|
||||
GO_ACC := $(TOOLS_DIR)/go-acc
|
||||
|
@ -52,7 +52,7 @@ GO_ACC_VERSION := latest
|
|||
GOIMPORTS := $(TOOLS_DIR)/goimports
|
||||
GOIMPORTS_VERSION := latest
|
||||
HELM := $(TOOLS_DIR)/helm
|
||||
HELM_VERSION := v3.10.1
|
||||
HELM_VERSION := v3.12.3
|
||||
HELM_DOCS := $(TOOLS_DIR)/helm-docs
|
||||
HELM_DOCS_VERSION := v1.11.0
|
||||
KO := $(TOOLS_DIR)/ko
|
||||
|
|
|
@ -21,10 +21,9 @@ package fake
|
|||
import (
|
||||
"context"
|
||||
|
||||
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -35,24 +34,24 @@ type FakeClusterPolicies struct {
|
|||
Fake *FakeKyvernoV1
|
||||
}
|
||||
|
||||
var clusterpoliciesResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1", Resource: "clusterpolicies"}
|
||||
var clusterpoliciesResource = v1.SchemeGroupVersion.WithResource("clusterpolicies")
|
||||
|
||||
var clusterpoliciesKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1", Kind: "ClusterPolicy"}
|
||||
var clusterpoliciesKind = v1.SchemeGroupVersion.WithKind("ClusterPolicy")
|
||||
|
||||
// Get takes name of the clusterPolicy, and returns the corresponding clusterPolicy object, and an error if there is any.
|
||||
func (c *FakeClusterPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *kyvernov1.ClusterPolicy, err error) {
|
||||
func (c *FakeClusterPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterPolicy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(clusterpoliciesResource, name), &kyvernov1.ClusterPolicy{})
|
||||
Invokes(testing.NewRootGetAction(clusterpoliciesResource, name), &v1.ClusterPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.ClusterPolicy), err
|
||||
return obj.(*v1.ClusterPolicy), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterPolicies that match those selectors.
|
||||
func (c *FakeClusterPolicies) List(ctx context.Context, opts v1.ListOptions) (result *kyvernov1.ClusterPolicyList, err error) {
|
||||
func (c *FakeClusterPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterPolicyList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(clusterpoliciesResource, clusterpoliciesKind, opts), &kyvernov1.ClusterPolicyList{})
|
||||
Invokes(testing.NewRootListAction(clusterpoliciesResource, clusterpoliciesKind, opts), &v1.ClusterPolicyList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -61,8 +60,8 @@ func (c *FakeClusterPolicies) List(ctx context.Context, opts v1.ListOptions) (re
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kyvernov1.ClusterPolicyList{ListMeta: obj.(*kyvernov1.ClusterPolicyList).ListMeta}
|
||||
for _, item := range obj.(*kyvernov1.ClusterPolicyList).Items {
|
||||
list := &v1.ClusterPolicyList{ListMeta: obj.(*v1.ClusterPolicyList).ListMeta}
|
||||
for _, item := range obj.(*v1.ClusterPolicyList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
|
@ -71,63 +70,63 @@ func (c *FakeClusterPolicies) List(ctx context.Context, opts v1.ListOptions) (re
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterPolicies.
|
||||
func (c *FakeClusterPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeClusterPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(clusterpoliciesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a clusterPolicy and creates it. Returns the server's representation of the clusterPolicy, and an error, if there is any.
|
||||
func (c *FakeClusterPolicies) Create(ctx context.Context, clusterPolicy *kyvernov1.ClusterPolicy, opts v1.CreateOptions) (result *kyvernov1.ClusterPolicy, err error) {
|
||||
func (c *FakeClusterPolicies) Create(ctx context.Context, clusterPolicy *v1.ClusterPolicy, opts metav1.CreateOptions) (result *v1.ClusterPolicy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(clusterpoliciesResource, clusterPolicy), &kyvernov1.ClusterPolicy{})
|
||||
Invokes(testing.NewRootCreateAction(clusterpoliciesResource, clusterPolicy), &v1.ClusterPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.ClusterPolicy), err
|
||||
return obj.(*v1.ClusterPolicy), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a clusterPolicy and updates it. Returns the server's representation of the clusterPolicy, and an error, if there is any.
|
||||
func (c *FakeClusterPolicies) Update(ctx context.Context, clusterPolicy *kyvernov1.ClusterPolicy, opts v1.UpdateOptions) (result *kyvernov1.ClusterPolicy, err error) {
|
||||
func (c *FakeClusterPolicies) Update(ctx context.Context, clusterPolicy *v1.ClusterPolicy, opts metav1.UpdateOptions) (result *v1.ClusterPolicy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(clusterpoliciesResource, clusterPolicy), &kyvernov1.ClusterPolicy{})
|
||||
Invokes(testing.NewRootUpdateAction(clusterpoliciesResource, clusterPolicy), &v1.ClusterPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.ClusterPolicy), err
|
||||
return obj.(*v1.ClusterPolicy), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeClusterPolicies) UpdateStatus(ctx context.Context, clusterPolicy *kyvernov1.ClusterPolicy, opts v1.UpdateOptions) (*kyvernov1.ClusterPolicy, error) {
|
||||
func (c *FakeClusterPolicies) UpdateStatus(ctx context.Context, clusterPolicy *v1.ClusterPolicy, opts metav1.UpdateOptions) (*v1.ClusterPolicy, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(clusterpoliciesResource, "status", clusterPolicy), &kyvernov1.ClusterPolicy{})
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(clusterpoliciesResource, "status", clusterPolicy), &v1.ClusterPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.ClusterPolicy), err
|
||||
return obj.(*v1.ClusterPolicy), err
|
||||
}
|
||||
|
||||
// Delete takes name of the clusterPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeClusterPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeClusterPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(clusterpoliciesResource, name, opts), &kyvernov1.ClusterPolicy{})
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(clusterpoliciesResource, name, opts), &v1.ClusterPolicy{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeClusterPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeClusterPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(clusterpoliciesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &kyvernov1.ClusterPolicyList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.ClusterPolicyList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched clusterPolicy.
|
||||
func (c *FakeClusterPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kyvernov1.ClusterPolicy, err error) {
|
||||
func (c *FakeClusterPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterPolicy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(clusterpoliciesResource, name, pt, data, subresources...), &kyvernov1.ClusterPolicy{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(clusterpoliciesResource, name, pt, data, subresources...), &v1.ClusterPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.ClusterPolicy), err
|
||||
return obj.(*v1.ClusterPolicy), err
|
||||
}
|
||||
|
|
|
@ -21,10 +21,9 @@ package fake
|
|||
import (
|
||||
"context"
|
||||
|
||||
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/kyverno/kyverno/api/kyverno/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,25 +35,25 @@ type FakePolicies struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var policiesResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1", Resource: "policies"}
|
||||
var policiesResource = v1.SchemeGroupVersion.WithResource("policies")
|
||||
|
||||
var policiesKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1", Kind: "Policy"}
|
||||
var policiesKind = v1.SchemeGroupVersion.WithKind("Policy")
|
||||
|
||||
// Get takes name of the policy, and returns the corresponding policy object, and an error if there is any.
|
||||
func (c *FakePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *kyvernov1.Policy, err error) {
|
||||
func (c *FakePolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Policy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(policiesResource, c.ns, name), &kyvernov1.Policy{})
|
||||
Invokes(testing.NewGetAction(policiesResource, c.ns, name), &v1.Policy{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.Policy), err
|
||||
return obj.(*v1.Policy), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Policies that match those selectors.
|
||||
func (c *FakePolicies) List(ctx context.Context, opts v1.ListOptions) (result *kyvernov1.PolicyList, err error) {
|
||||
func (c *FakePolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PolicyList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(policiesResource, policiesKind, c.ns, opts), &kyvernov1.PolicyList{})
|
||||
Invokes(testing.NewListAction(policiesResource, policiesKind, c.ns, opts), &v1.PolicyList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
@ -64,8 +63,8 @@ func (c *FakePolicies) List(ctx context.Context, opts v1.ListOptions) (result *k
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kyvernov1.PolicyList{ListMeta: obj.(*kyvernov1.PolicyList).ListMeta}
|
||||
for _, item := range obj.(*kyvernov1.PolicyList).Items {
|
||||
list := &v1.PolicyList{ListMeta: obj.(*v1.PolicyList).ListMeta}
|
||||
for _, item := range obj.(*v1.PolicyList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
|
@ -74,69 +73,69 @@ func (c *FakePolicies) List(ctx context.Context, opts v1.ListOptions) (result *k
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested policies.
|
||||
func (c *FakePolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakePolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(policiesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a policy and creates it. Returns the server's representation of the policy, and an error, if there is any.
|
||||
func (c *FakePolicies) Create(ctx context.Context, policy *kyvernov1.Policy, opts v1.CreateOptions) (result *kyvernov1.Policy, err error) {
|
||||
func (c *FakePolicies) Create(ctx context.Context, policy *v1.Policy, opts metav1.CreateOptions) (result *v1.Policy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(policiesResource, c.ns, policy), &kyvernov1.Policy{})
|
||||
Invokes(testing.NewCreateAction(policiesResource, c.ns, policy), &v1.Policy{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.Policy), err
|
||||
return obj.(*v1.Policy), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a policy and updates it. Returns the server's representation of the policy, and an error, if there is any.
|
||||
func (c *FakePolicies) Update(ctx context.Context, policy *kyvernov1.Policy, opts v1.UpdateOptions) (result *kyvernov1.Policy, err error) {
|
||||
func (c *FakePolicies) Update(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) (result *v1.Policy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(policiesResource, c.ns, policy), &kyvernov1.Policy{})
|
||||
Invokes(testing.NewUpdateAction(policiesResource, c.ns, policy), &v1.Policy{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.Policy), err
|
||||
return obj.(*v1.Policy), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakePolicies) UpdateStatus(ctx context.Context, policy *kyvernov1.Policy, opts v1.UpdateOptions) (*kyvernov1.Policy, error) {
|
||||
func (c *FakePolicies) UpdateStatus(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) (*v1.Policy, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(policiesResource, "status", c.ns, policy), &kyvernov1.Policy{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(policiesResource, "status", c.ns, policy), &v1.Policy{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.Policy), err
|
||||
return obj.(*v1.Policy), err
|
||||
}
|
||||
|
||||
// Delete takes name of the policy and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakePolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(policiesResource, c.ns, name, opts), &kyvernov1.Policy{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(policiesResource, c.ns, name, opts), &v1.Policy{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakePolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(policiesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &kyvernov1.PolicyList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.PolicyList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched policy.
|
||||
func (c *FakePolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kyvernov1.Policy, err error) {
|
||||
func (c *FakePolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Policy, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(policiesResource, c.ns, name, pt, data, subresources...), &kyvernov1.Policy{})
|
||||
Invokes(testing.NewPatchSubresourceAction(policiesResource, c.ns, name, pt, data, subresources...), &v1.Policy{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*kyvernov1.Policy), err
|
||||
return obj.(*v1.Policy), err
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakeAdmissionReports struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var admissionreportsResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1alpha2", Resource: "admissionreports"}
|
||||
var admissionreportsResource = v1alpha2.SchemeGroupVersion.WithResource("admissionreports")
|
||||
|
||||
var admissionreportsKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1alpha2", Kind: "AdmissionReport"}
|
||||
var admissionreportsKind = v1alpha2.SchemeGroupVersion.WithKind("AdmissionReport")
|
||||
|
||||
// Get takes name of the admissionReport, and returns the corresponding admissionReport object, and an error if there is any.
|
||||
func (c *FakeAdmissionReports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.AdmissionReport, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakeBackgroundScanReports struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var backgroundscanreportsResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1alpha2", Resource: "backgroundscanreports"}
|
||||
var backgroundscanreportsResource = v1alpha2.SchemeGroupVersion.WithResource("backgroundscanreports")
|
||||
|
||||
var backgroundscanreportsKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1alpha2", Kind: "BackgroundScanReport"}
|
||||
var backgroundscanreportsKind = v1alpha2.SchemeGroupVersion.WithKind("BackgroundScanReport")
|
||||
|
||||
// Get takes name of the backgroundScanReport, and returns the corresponding backgroundScanReport object, and an error if there is any.
|
||||
func (c *FakeBackgroundScanReports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.BackgroundScanReport, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -35,9 +34,9 @@ type FakeClusterAdmissionReports struct {
|
|||
Fake *FakeKyvernoV1alpha2
|
||||
}
|
||||
|
||||
var clusteradmissionreportsResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1alpha2", Resource: "clusteradmissionreports"}
|
||||
var clusteradmissionreportsResource = v1alpha2.SchemeGroupVersion.WithResource("clusteradmissionreports")
|
||||
|
||||
var clusteradmissionreportsKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1alpha2", Kind: "ClusterAdmissionReport"}
|
||||
var clusteradmissionreportsKind = v1alpha2.SchemeGroupVersion.WithKind("ClusterAdmissionReport")
|
||||
|
||||
// Get takes name of the clusterAdmissionReport, and returns the corresponding clusterAdmissionReport object, and an error if there is any.
|
||||
func (c *FakeClusterAdmissionReports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ClusterAdmissionReport, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -35,9 +34,9 @@ type FakeClusterBackgroundScanReports struct {
|
|||
Fake *FakeKyvernoV1alpha2
|
||||
}
|
||||
|
||||
var clusterbackgroundscanreportsResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1alpha2", Resource: "clusterbackgroundscanreports"}
|
||||
var clusterbackgroundscanreportsResource = v1alpha2.SchemeGroupVersion.WithResource("clusterbackgroundscanreports")
|
||||
|
||||
var clusterbackgroundscanreportsKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1alpha2", Kind: "ClusterBackgroundScanReport"}
|
||||
var clusterbackgroundscanreportsKind = v1alpha2.SchemeGroupVersion.WithKind("ClusterBackgroundScanReport")
|
||||
|
||||
// Get takes name of the clusterBackgroundScanReport, and returns the corresponding clusterBackgroundScanReport object, and an error if there is any.
|
||||
func (c *FakeClusterBackgroundScanReports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ClusterBackgroundScanReport, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakeUpdateRequests struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var updaterequestsResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v1beta1", Resource: "updaterequests"}
|
||||
var updaterequestsResource = v1beta1.SchemeGroupVersion.WithResource("updaterequests")
|
||||
|
||||
var updaterequestsKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v1beta1", Kind: "UpdateRequest"}
|
||||
var updaterequestsKind = v1beta1.SchemeGroupVersion.WithKind("UpdateRequest")
|
||||
|
||||
// Get takes name of the updateRequest, and returns the corresponding updateRequest object, and an error if there is any.
|
||||
func (c *FakeUpdateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.UpdateRequest, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakeCleanupPolicies struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var cleanuppoliciesResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v2alpha1", Resource: "cleanuppolicies"}
|
||||
var cleanuppoliciesResource = v2alpha1.SchemeGroupVersion.WithResource("cleanuppolicies")
|
||||
|
||||
var cleanuppoliciesKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v2alpha1", Kind: "CleanupPolicy"}
|
||||
var cleanuppoliciesKind = v2alpha1.SchemeGroupVersion.WithKind("CleanupPolicy")
|
||||
|
||||
// Get takes name of the cleanupPolicy, and returns the corresponding cleanupPolicy object, and an error if there is any.
|
||||
func (c *FakeCleanupPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CleanupPolicy, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -35,9 +34,9 @@ type FakeClusterCleanupPolicies struct {
|
|||
Fake *FakeKyvernoV2alpha1
|
||||
}
|
||||
|
||||
var clustercleanuppoliciesResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v2alpha1", Resource: "clustercleanuppolicies"}
|
||||
var clustercleanuppoliciesResource = v2alpha1.SchemeGroupVersion.WithResource("clustercleanuppolicies")
|
||||
|
||||
var clustercleanuppoliciesKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v2alpha1", Kind: "ClusterCleanupPolicy"}
|
||||
var clustercleanuppoliciesKind = v2alpha1.SchemeGroupVersion.WithKind("ClusterCleanupPolicy")
|
||||
|
||||
// Get takes name of the clusterCleanupPolicy, and returns the corresponding clusterCleanupPolicy object, and an error if there is any.
|
||||
func (c *FakeClusterCleanupPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ClusterCleanupPolicy, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakePolicyExceptions struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var policyexceptionsResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v2alpha1", Resource: "policyexceptions"}
|
||||
var policyexceptionsResource = v2alpha1.SchemeGroupVersion.WithResource("policyexceptions")
|
||||
|
||||
var policyexceptionsKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v2alpha1", Kind: "PolicyException"}
|
||||
var policyexceptionsKind = v2alpha1.SchemeGroupVersion.WithKind("PolicyException")
|
||||
|
||||
// Get takes name of the policyException, and returns the corresponding policyException object, and an error if there is any.
|
||||
func (c *FakePolicyExceptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.PolicyException, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -35,9 +34,9 @@ type FakeClusterPolicies struct {
|
|||
Fake *FakeKyvernoV2beta1
|
||||
}
|
||||
|
||||
var clusterpoliciesResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v2beta1", Resource: "clusterpolicies"}
|
||||
var clusterpoliciesResource = v2beta1.SchemeGroupVersion.WithResource("clusterpolicies")
|
||||
|
||||
var clusterpoliciesKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v2beta1", Kind: "ClusterPolicy"}
|
||||
var clusterpoliciesKind = v2beta1.SchemeGroupVersion.WithKind("ClusterPolicy")
|
||||
|
||||
// Get takes name of the clusterPolicy, and returns the corresponding clusterPolicy object, and an error if there is any.
|
||||
func (c *FakeClusterPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.ClusterPolicy, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakePolicies struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var policiesResource = schema.GroupVersionResource{Group: "kyverno.io", Version: "v2beta1", Resource: "policies"}
|
||||
var policiesResource = v2beta1.SchemeGroupVersion.WithResource("policies")
|
||||
|
||||
var policiesKind = schema.GroupVersionKind{Group: "kyverno.io", Version: "v2beta1", Kind: "Policy"}
|
||||
var policiesKind = v2beta1.SchemeGroupVersion.WithKind("Policy")
|
||||
|
||||
// Get takes name of the policy, and returns the corresponding policy object, and an error if there is any.
|
||||
func (c *FakePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.Policy, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -35,9 +34,9 @@ type FakeClusterPolicyReports struct {
|
|||
Fake *FakeWgpolicyk8sV1alpha2
|
||||
}
|
||||
|
||||
var clusterpolicyreportsResource = schema.GroupVersionResource{Group: "wgpolicyk8s.io", Version: "v1alpha2", Resource: "clusterpolicyreports"}
|
||||
var clusterpolicyreportsResource = v1alpha2.SchemeGroupVersion.WithResource("clusterpolicyreports")
|
||||
|
||||
var clusterpolicyreportsKind = schema.GroupVersionKind{Group: "wgpolicyk8s.io", Version: "v1alpha2", Kind: "ClusterPolicyReport"}
|
||||
var clusterpolicyreportsKind = v1alpha2.SchemeGroupVersion.WithKind("ClusterPolicyReport")
|
||||
|
||||
// Get takes name of the clusterPolicyReport, and returns the corresponding clusterPolicyReport object, and an error if there is any.
|
||||
func (c *FakeClusterPolicyReports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ClusterPolicyReport, err error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
v1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
|
@ -36,9 +35,9 @@ type FakePolicyReports struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var policyreportsResource = schema.GroupVersionResource{Group: "wgpolicyk8s.io", Version: "v1alpha2", Resource: "policyreports"}
|
||||
var policyreportsResource = v1alpha2.SchemeGroupVersion.WithResource("policyreports")
|
||||
|
||||
var policyreportsKind = schema.GroupVersionKind{Group: "wgpolicyk8s.io", Version: "v1alpha2", Kind: "PolicyReport"}
|
||||
var policyreportsKind = v1alpha2.SchemeGroupVersion.WithKind("PolicyReport")
|
||||
|
||||
// Get takes name of the policyReport, and returns the corresponding policyReport object, and an error if there is any.
|
||||
func (c *FakePolicyReports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PolicyReport, err error) {
|
||||
|
|
|
@ -167,7 +167,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref
|
|||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
|
@ -240,7 +240,7 @@ type SharedInformerFactory interface {
|
|||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue