From f4aba55e0acbb2e166bf351eaf2c49dfb7bb88bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Sat, 27 Jan 2024 09:03:01 +0100 Subject: [PATCH] fix: move new reports api to top level folder (#9531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- Makefile | 2 +- .../reports/v1/admission_report_types.go | 0 .../v1/background_scan_report_types.go | 0 api/{kyverno => }/reports/v1/doc.go | 0 .../reports/v1/zz_generated.deepcopy.go | 0 .../reports/v1/zz_generated.defaults.go | 0 .../reports/v1/zz_generated.register.go | 0 docs/user/crd/index.html | 12 +-- .../kyverno/v1alpha2/admissionreportspec.go | 67 --------------- .../v1alpha2/backgroundscanreportspec.go | 57 ------------- .../kyverno/v2alpha1/cleanuppolicyspec.go | 85 ------------------- .../kyverno/v2alpha1/cleanuppolicystatus.go | 54 ------------ .../kyverno/v2alpha1/exception.go | 50 ----------- .../kyverno/v2alpha1/policyexceptionspec.go | 66 -------------- pkg/client/applyconfigurations/utils.go | 2 +- pkg/client/clientset/versioned/doc.go | 20 ----- .../clientset/versioned/fake/register.go | 2 +- .../clientset/versioned/scheme/register.go | 2 +- .../typed/reports/v1/admissionreport.go | 2 +- .../typed/reports/v1/backgroundscanreport.go | 2 +- .../reports/v1/clusteradmissionreport.go | 2 +- .../reports/v1/clusterbackgroundscanreport.go | 2 +- .../reports/v1/fake/fake_admissionreport.go | 2 +- .../v1/fake/fake_backgroundscanreport.go | 2 +- .../v1/fake/fake_clusteradmissionreport.go | 2 +- .../fake/fake_clusterbackgroundscanreport.go | 2 +- .../typed/reports/v1/reports_client.go | 2 +- .../informers/externalversions/generic.go | 2 +- .../reports/v1/admissionreport.go | 2 +- .../reports/v1/backgroundscanreport.go | 2 +- .../reports/v1/clusteradmissionreport.go | 2 +- .../reports/v1/clusterbackgroundscanreport.go | 2 +- .../kyverno/v1beta1/expansion_generated.go | 8 ++ .../v1beta1/updaterequest_expansion.go | 41 --------- .../listers/reports/v1/admissionreport.go | 2 +- .../reports/v1/backgroundscanreport.go | 2 +- .../reports/v1/clusteradmissionreport.go | 2 +- .../reports/v1/clusterbackgroundscanreport.go | 2 +- .../admissionreports/resource.generated.go | 32 +++---- .../resource.generated.go | 32 +++---- .../resource.generated.go | 32 +++---- .../resource.generated.go | 32 +++---- pkg/report/copy.go | 10 +-- pkg/report/create.go | 10 +-- pkg/report/delete.go | 10 +-- pkg/report/new.go | 10 +-- pkg/report/report_manager.go | 10 +-- pkg/report/update.go | 10 +-- 48 files changed, 130 insertions(+), 562 deletions(-) rename api/{kyverno => }/reports/v1/admission_report_types.go (100%) rename api/{kyverno => }/reports/v1/background_scan_report_types.go (100%) rename api/{kyverno => }/reports/v1/doc.go (100%) rename api/{kyverno => }/reports/v1/zz_generated.deepcopy.go (100%) rename api/{kyverno => }/reports/v1/zz_generated.defaults.go (100%) rename api/{kyverno => }/reports/v1/zz_generated.register.go (100%) delete mode 100644 pkg/client/applyconfigurations/kyverno/v1alpha2/admissionreportspec.go delete mode 100644 pkg/client/applyconfigurations/kyverno/v1alpha2/backgroundscanreportspec.go delete mode 100644 pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicyspec.go delete mode 100644 pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicystatus.go delete mode 100644 pkg/client/applyconfigurations/kyverno/v2alpha1/exception.go delete mode 100644 pkg/client/applyconfigurations/kyverno/v2alpha1/policyexceptionspec.go delete mode 100644 pkg/client/clientset/versioned/doc.go delete mode 100644 pkg/client/listers/kyverno/v1beta1/updaterequest_expansion.go diff --git a/Makefile b/Makefile index f63219e557..65fbca0e68 100644 --- a/Makefile +++ b/Makefile @@ -396,7 +396,7 @@ image-build-all: $(BUILD_WITH)-build-all GOPATH_SHIM := ${PWD}/.gopath PACKAGE_SHIM := $(GOPATH_SHIM)/src/$(PACKAGE) OUT_PACKAGE := $(PACKAGE)/pkg/client -INPUT_DIRS := $(PACKAGE)/api/kyverno/v1,$(PACKAGE)/api/kyverno/v1alpha2,$(PACKAGE)/api/kyverno/v1beta1,$(PACKAGE)/api/kyverno/v2,$(PACKAGE)/api/kyverno/v2beta1,$(PACKAGE)/api/kyverno/v2alpha1,$(PACKAGE)/api/kyverno/reports/v1,$(PACKAGE)/api/policyreport/v1alpha2 +INPUT_DIRS := $(PACKAGE)/api/kyverno/v1,$(PACKAGE)/api/kyverno/v1alpha2,$(PACKAGE)/api/kyverno/v1beta1,$(PACKAGE)/api/kyverno/v2,$(PACKAGE)/api/kyverno/v2beta1,$(PACKAGE)/api/kyverno/v2alpha1,$(PACKAGE)/api/reports/v1,$(PACKAGE)/api/policyreport/v1alpha2 CLIENTSET_PACKAGE := $(OUT_PACKAGE)/clientset LISTERS_PACKAGE := $(OUT_PACKAGE)/listers INFORMERS_PACKAGE := $(OUT_PACKAGE)/informers diff --git a/api/kyverno/reports/v1/admission_report_types.go b/api/reports/v1/admission_report_types.go similarity index 100% rename from api/kyverno/reports/v1/admission_report_types.go rename to api/reports/v1/admission_report_types.go diff --git a/api/kyverno/reports/v1/background_scan_report_types.go b/api/reports/v1/background_scan_report_types.go similarity index 100% rename from api/kyverno/reports/v1/background_scan_report_types.go rename to api/reports/v1/background_scan_report_types.go diff --git a/api/kyverno/reports/v1/doc.go b/api/reports/v1/doc.go similarity index 100% rename from api/kyverno/reports/v1/doc.go rename to api/reports/v1/doc.go diff --git a/api/kyverno/reports/v1/zz_generated.deepcopy.go b/api/reports/v1/zz_generated.deepcopy.go similarity index 100% rename from api/kyverno/reports/v1/zz_generated.deepcopy.go rename to api/reports/v1/zz_generated.deepcopy.go diff --git a/api/kyverno/reports/v1/zz_generated.defaults.go b/api/reports/v1/zz_generated.defaults.go similarity index 100% rename from api/kyverno/reports/v1/zz_generated.defaults.go rename to api/reports/v1/zz_generated.defaults.go diff --git a/api/kyverno/reports/v1/zz_generated.register.go b/api/reports/v1/zz_generated.register.go similarity index 100% rename from api/kyverno/reports/v1/zz_generated.register.go rename to api/reports/v1/zz_generated.register.go diff --git a/docs/user/crd/index.html b/docs/user/crd/index.html index 136378e9df..bf36ef2310 100644 --- a/docs/user/crd/index.html +++ b/docs/user/crd/index.html @@ -10802,10 +10802,10 @@ PolicyReportSummary (Appears on: ClusterPolicyReport, PolicyReport, -AdmissionReportSpec, -BackgroundScanReportSpec, AdmissionReportSpec, -BackgroundScanReportSpec) +BackgroundScanReportSpec, +AdmissionReportSpec, +BackgroundScanReportSpec)

PolicyReportResult provides the result for an individual policy

@@ -10978,10 +10978,10 @@ PolicySeverity (Appears on: ClusterPolicyReport, PolicyReport, -AdmissionReportSpec, -BackgroundScanReportSpec, AdmissionReportSpec, -BackgroundScanReportSpec) +BackgroundScanReportSpec, +AdmissionReportSpec, +BackgroundScanReportSpec)

PolicyReportSummary provides a status count summary

diff --git a/pkg/client/applyconfigurations/kyverno/v1alpha2/admissionreportspec.go b/pkg/client/applyconfigurations/kyverno/v1alpha2/admissionreportspec.go deleted file mode 100644 index d7cfc8201b..0000000000 --- a/pkg/client/applyconfigurations/kyverno/v1alpha2/admissionreportspec.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1alpha2 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/policyreport/v1alpha2" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// AdmissionReportSpecApplyConfiguration represents an declarative configuration of the AdmissionReportSpec type for use -// with apply. -type AdmissionReportSpecApplyConfiguration struct { - Owner *v1.OwnerReferenceApplyConfiguration `json:"owner,omitempty"` - Summary *v1alpha2.PolicyReportSummaryApplyConfiguration `json:"summary,omitempty"` - Results []v1alpha2.PolicyReportResultApplyConfiguration `json:"results,omitempty"` -} - -// AdmissionReportSpecApplyConfiguration constructs an declarative configuration of the AdmissionReportSpec type for use with -// apply. -func AdmissionReportSpec() *AdmissionReportSpecApplyConfiguration { - return &AdmissionReportSpecApplyConfiguration{} -} - -// WithOwner sets the Owner field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Owner field is set to the value of the last call. -func (b *AdmissionReportSpecApplyConfiguration) WithOwner(value *v1.OwnerReferenceApplyConfiguration) *AdmissionReportSpecApplyConfiguration { - b.Owner = value - return b -} - -// WithSummary sets the Summary field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Summary field is set to the value of the last call. -func (b *AdmissionReportSpecApplyConfiguration) WithSummary(value *v1alpha2.PolicyReportSummaryApplyConfiguration) *AdmissionReportSpecApplyConfiguration { - b.Summary = value - return b -} - -// WithResults adds the given value to the Results field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Results field. -func (b *AdmissionReportSpecApplyConfiguration) WithResults(values ...*v1alpha2.PolicyReportResultApplyConfiguration) *AdmissionReportSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResults") - } - b.Results = append(b.Results, *values[i]) - } - return b -} diff --git a/pkg/client/applyconfigurations/kyverno/v1alpha2/backgroundscanreportspec.go b/pkg/client/applyconfigurations/kyverno/v1alpha2/backgroundscanreportspec.go deleted file mode 100644 index 7e5ad6a242..0000000000 --- a/pkg/client/applyconfigurations/kyverno/v1alpha2/backgroundscanreportspec.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1alpha2 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/policyreport/v1alpha2" -) - -// BackgroundScanReportSpecApplyConfiguration represents an declarative configuration of the BackgroundScanReportSpec type for use -// with apply. -type BackgroundScanReportSpecApplyConfiguration struct { - Summary *v1alpha2.PolicyReportSummaryApplyConfiguration `json:"summary,omitempty"` - Results []v1alpha2.PolicyReportResultApplyConfiguration `json:"results,omitempty"` -} - -// BackgroundScanReportSpecApplyConfiguration constructs an declarative configuration of the BackgroundScanReportSpec type for use with -// apply. -func BackgroundScanReportSpec() *BackgroundScanReportSpecApplyConfiguration { - return &BackgroundScanReportSpecApplyConfiguration{} -} - -// WithSummary sets the Summary field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Summary field is set to the value of the last call. -func (b *BackgroundScanReportSpecApplyConfiguration) WithSummary(value *v1alpha2.PolicyReportSummaryApplyConfiguration) *BackgroundScanReportSpecApplyConfiguration { - b.Summary = value - return b -} - -// WithResults adds the given value to the Results field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Results field. -func (b *BackgroundScanReportSpecApplyConfiguration) WithResults(values ...*v1alpha2.PolicyReportResultApplyConfiguration) *BackgroundScanReportSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResults") - } - b.Results = append(b.Results, *values[i]) - } - return b -} diff --git a/pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicyspec.go b/pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicyspec.go deleted file mode 100644 index cb3de2a679..0000000000 --- a/pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicyspec.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - v1 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/kyverno/v1" - v2beta1 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/kyverno/v2beta1" -) - -// CleanupPolicySpecApplyConfiguration represents an declarative configuration of the CleanupPolicySpec type for use -// with apply. -type CleanupPolicySpecApplyConfiguration struct { - Context []v1.ContextEntryApplyConfiguration `json:"context,omitempty"` - MatchResources *v2beta1.MatchResourcesApplyConfiguration `json:"match,omitempty"` - ExcludeResources *v2beta1.MatchResourcesApplyConfiguration `json:"exclude,omitempty"` - Schedule *string `json:"schedule,omitempty"` - Conditions *v2beta1.AnyAllConditionsApplyConfiguration `json:"conditions,omitempty"` -} - -// CleanupPolicySpecApplyConfiguration constructs an declarative configuration of the CleanupPolicySpec type for use with -// apply. -func CleanupPolicySpec() *CleanupPolicySpecApplyConfiguration { - return &CleanupPolicySpecApplyConfiguration{} -} - -// WithContext adds the given value to the Context field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Context field. -func (b *CleanupPolicySpecApplyConfiguration) WithContext(values ...*v1.ContextEntryApplyConfiguration) *CleanupPolicySpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithContext") - } - b.Context = append(b.Context, *values[i]) - } - return b -} - -// WithMatchResources sets the MatchResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MatchResources field is set to the value of the last call. -func (b *CleanupPolicySpecApplyConfiguration) WithMatchResources(value *v2beta1.MatchResourcesApplyConfiguration) *CleanupPolicySpecApplyConfiguration { - b.MatchResources = value - return b -} - -// WithExcludeResources sets the ExcludeResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExcludeResources field is set to the value of the last call. -func (b *CleanupPolicySpecApplyConfiguration) WithExcludeResources(value *v2beta1.MatchResourcesApplyConfiguration) *CleanupPolicySpecApplyConfiguration { - b.ExcludeResources = value - return b -} - -// WithSchedule sets the Schedule field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schedule field is set to the value of the last call. -func (b *CleanupPolicySpecApplyConfiguration) WithSchedule(value string) *CleanupPolicySpecApplyConfiguration { - b.Schedule = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *CleanupPolicySpecApplyConfiguration) WithConditions(value *v2beta1.AnyAllConditionsApplyConfiguration) *CleanupPolicySpecApplyConfiguration { - b.Conditions = value - return b -} diff --git a/pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicystatus.go b/pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicystatus.go deleted file mode 100644 index 53c13a1b11..0000000000 --- a/pkg/client/applyconfigurations/kyverno/v2alpha1/cleanuppolicystatus.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CleanupPolicyStatusApplyConfiguration represents an declarative configuration of the CleanupPolicyStatus type for use -// with apply. -type CleanupPolicyStatusApplyConfiguration struct { - Conditions []v1.Condition `json:"conditions,omitempty"` - LastExecutionTime *v1.Time `json:"lastExecutionTime,omitempty"` -} - -// CleanupPolicyStatusApplyConfiguration constructs an declarative configuration of the CleanupPolicyStatus type for use with -// apply. -func CleanupPolicyStatus() *CleanupPolicyStatusApplyConfiguration { - return &CleanupPolicyStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CleanupPolicyStatusApplyConfiguration) WithConditions(values ...v1.Condition) *CleanupPolicyStatusApplyConfiguration { - for i := range values { - b.Conditions = append(b.Conditions, values[i]) - } - return b -} - -// WithLastExecutionTime sets the LastExecutionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastExecutionTime field is set to the value of the last call. -func (b *CleanupPolicyStatusApplyConfiguration) WithLastExecutionTime(value v1.Time) *CleanupPolicyStatusApplyConfiguration { - b.LastExecutionTime = &value - return b -} diff --git a/pkg/client/applyconfigurations/kyverno/v2alpha1/exception.go b/pkg/client/applyconfigurations/kyverno/v2alpha1/exception.go deleted file mode 100644 index 0f1f67b0eb..0000000000 --- a/pkg/client/applyconfigurations/kyverno/v2alpha1/exception.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v2alpha1 - -// ExceptionApplyConfiguration represents an declarative configuration of the Exception type for use -// with apply. -type ExceptionApplyConfiguration struct { - PolicyName *string `json:"policyName,omitempty"` - RuleNames []string `json:"ruleNames,omitempty"` -} - -// ExceptionApplyConfiguration constructs an declarative configuration of the Exception type for use with -// apply. -func Exception() *ExceptionApplyConfiguration { - return &ExceptionApplyConfiguration{} -} - -// WithPolicyName sets the PolicyName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PolicyName field is set to the value of the last call. -func (b *ExceptionApplyConfiguration) WithPolicyName(value string) *ExceptionApplyConfiguration { - b.PolicyName = &value - return b -} - -// WithRuleNames adds the given value to the RuleNames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RuleNames field. -func (b *ExceptionApplyConfiguration) WithRuleNames(values ...string) *ExceptionApplyConfiguration { - for i := range values { - b.RuleNames = append(b.RuleNames, values[i]) - } - return b -} diff --git a/pkg/client/applyconfigurations/kyverno/v2alpha1/policyexceptionspec.go b/pkg/client/applyconfigurations/kyverno/v2alpha1/policyexceptionspec.go deleted file mode 100644 index 7dbb6c91f7..0000000000 --- a/pkg/client/applyconfigurations/kyverno/v2alpha1/policyexceptionspec.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - v2beta1 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/kyverno/v2beta1" -) - -// PolicyExceptionSpecApplyConfiguration represents an declarative configuration of the PolicyExceptionSpec type for use -// with apply. -type PolicyExceptionSpecApplyConfiguration struct { - Background *bool `json:"background,omitempty"` - Match *v2beta1.MatchResourcesApplyConfiguration `json:"match,omitempty"` - Exceptions []ExceptionApplyConfiguration `json:"exceptions,omitempty"` -} - -// PolicyExceptionSpecApplyConfiguration constructs an declarative configuration of the PolicyExceptionSpec type for use with -// apply. -func PolicyExceptionSpec() *PolicyExceptionSpecApplyConfiguration { - return &PolicyExceptionSpecApplyConfiguration{} -} - -// WithBackground sets the Background field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Background field is set to the value of the last call. -func (b *PolicyExceptionSpecApplyConfiguration) WithBackground(value bool) *PolicyExceptionSpecApplyConfiguration { - b.Background = &value - return b -} - -// WithMatch sets the Match field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Match field is set to the value of the last call. -func (b *PolicyExceptionSpecApplyConfiguration) WithMatch(value *v2beta1.MatchResourcesApplyConfiguration) *PolicyExceptionSpecApplyConfiguration { - b.Match = value - return b -} - -// WithExceptions adds the given value to the Exceptions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Exceptions field. -func (b *PolicyExceptionSpecApplyConfiguration) WithExceptions(values ...*ExceptionApplyConfiguration) *PolicyExceptionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithExceptions") - } - b.Exceptions = append(b.Exceptions, *values[i]) - } - return b -} diff --git a/pkg/client/applyconfigurations/utils.go b/pkg/client/applyconfigurations/utils.go index fa54814302..910984a366 100644 --- a/pkg/client/applyconfigurations/utils.go +++ b/pkg/client/applyconfigurations/utils.go @@ -19,7 +19,6 @@ limitations under the License. package applyconfigurations import ( - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" v1 "github.com/kyverno/kyverno/api/kyverno/v1" v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" @@ -27,6 +26,7 @@ import ( v2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1" v2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1" policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" kyvernov1 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/kyverno/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/kyverno/v1alpha2" kyvernov1beta1 "github.com/kyverno/kyverno/pkg/client/applyconfigurations/kyverno/v1beta1" diff --git a/pkg/client/clientset/versioned/doc.go b/pkg/client/clientset/versioned/doc.go deleted file mode 100644 index 41721ca52d..0000000000 --- a/pkg/client/clientset/versioned/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index e46f805c88..5167ae96ca 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -19,7 +19,6 @@ limitations under the License. package fake import ( - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" kyvernov1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" @@ -27,6 +26,7 @@ import ( kyvernov2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1" kyvernov2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1" wgpolicyk8sv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 53250df83f..882af745eb 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -19,7 +19,6 @@ limitations under the License. package scheme import ( - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" kyvernov1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" @@ -27,6 +26,7 @@ import ( kyvernov2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1" kyvernov2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1" wgpolicyk8sv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/admissionreport.go b/pkg/client/clientset/versioned/typed/reports/v1/admissionreport.go index 0365f9d43f..0ae385cea5 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/admissionreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/admissionreport.go @@ -22,7 +22,7 @@ import ( "context" "time" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" scheme "github.com/kyverno/kyverno/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/backgroundscanreport.go b/pkg/client/clientset/versioned/typed/reports/v1/backgroundscanreport.go index 9e54546242..6060d199f2 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/backgroundscanreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/backgroundscanreport.go @@ -22,7 +22,7 @@ import ( "context" "time" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" scheme "github.com/kyverno/kyverno/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/clusteradmissionreport.go b/pkg/client/clientset/versioned/typed/reports/v1/clusteradmissionreport.go index 0326055a5d..b649272152 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/clusteradmissionreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/clusteradmissionreport.go @@ -22,7 +22,7 @@ import ( "context" "time" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" scheme "github.com/kyverno/kyverno/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/clusterbackgroundscanreport.go b/pkg/client/clientset/versioned/typed/reports/v1/clusterbackgroundscanreport.go index 6c5ae883e6..96ae65b6b1 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/clusterbackgroundscanreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/clusterbackgroundscanreport.go @@ -22,7 +22,7 @@ import ( "context" "time" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" scheme "github.com/kyverno/kyverno/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_admissionreport.go b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_admissionreport.go index d682fa6c26..1e606d8f53 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_admissionreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_admissionreport.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_backgroundscanreport.go b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_backgroundscanreport.go index 58f21fc3e6..d579608f7c 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_backgroundscanreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_backgroundscanreport.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusteradmissionreport.go b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusteradmissionreport.go index 405b143f7d..237d3572b3 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusteradmissionreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusteradmissionreport.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusterbackgroundscanreport.go b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusterbackgroundscanreport.go index f2a0c1f217..5b3bc9240b 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusterbackgroundscanreport.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/fake/fake_clusterbackgroundscanreport.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/reports/v1/reports_client.go b/pkg/client/clientset/versioned/typed/reports/v1/reports_client.go index 31477dd115..926a9667e7 100644 --- a/pkg/client/clientset/versioned/typed/reports/v1/reports_client.go +++ b/pkg/client/clientset/versioned/typed/reports/v1/reports_client.go @@ -21,7 +21,7 @@ package v1 import ( "net/http" - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" "github.com/kyverno/kyverno/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index be8bedb457..68993c7f59 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -21,7 +21,6 @@ package externalversions import ( "fmt" - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" v1 "github.com/kyverno/kyverno/api/kyverno/v1" v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" @@ -29,6 +28,7 @@ import ( v2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1" v2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1" policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) diff --git a/pkg/client/informers/externalversions/reports/v1/admissionreport.go b/pkg/client/informers/externalversions/reports/v1/admissionreport.go index 77f087e5fd..fea8b4d796 100644 --- a/pkg/client/informers/externalversions/reports/v1/admissionreport.go +++ b/pkg/client/informers/externalversions/reports/v1/admissionreport.go @@ -22,7 +22,7 @@ import ( "context" time "time" - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" internalinterfaces "github.com/kyverno/kyverno/pkg/client/informers/externalversions/internalinterfaces" v1 "github.com/kyverno/kyverno/pkg/client/listers/reports/v1" diff --git a/pkg/client/informers/externalversions/reports/v1/backgroundscanreport.go b/pkg/client/informers/externalversions/reports/v1/backgroundscanreport.go index 9d401e0325..195ba894b6 100644 --- a/pkg/client/informers/externalversions/reports/v1/backgroundscanreport.go +++ b/pkg/client/informers/externalversions/reports/v1/backgroundscanreport.go @@ -22,7 +22,7 @@ import ( "context" time "time" - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" internalinterfaces "github.com/kyverno/kyverno/pkg/client/informers/externalversions/internalinterfaces" v1 "github.com/kyverno/kyverno/pkg/client/listers/reports/v1" diff --git a/pkg/client/informers/externalversions/reports/v1/clusteradmissionreport.go b/pkg/client/informers/externalversions/reports/v1/clusteradmissionreport.go index c0ede6ef64..881395ded8 100644 --- a/pkg/client/informers/externalversions/reports/v1/clusteradmissionreport.go +++ b/pkg/client/informers/externalversions/reports/v1/clusteradmissionreport.go @@ -22,7 +22,7 @@ import ( "context" time "time" - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" internalinterfaces "github.com/kyverno/kyverno/pkg/client/informers/externalversions/internalinterfaces" v1 "github.com/kyverno/kyverno/pkg/client/listers/reports/v1" diff --git a/pkg/client/informers/externalversions/reports/v1/clusterbackgroundscanreport.go b/pkg/client/informers/externalversions/reports/v1/clusterbackgroundscanreport.go index f65714adbb..183ab63393 100644 --- a/pkg/client/informers/externalversions/reports/v1/clusterbackgroundscanreport.go +++ b/pkg/client/informers/externalversions/reports/v1/clusterbackgroundscanreport.go @@ -22,7 +22,7 @@ import ( "context" time "time" - reportsv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" internalinterfaces "github.com/kyverno/kyverno/pkg/client/informers/externalversions/internalinterfaces" v1 "github.com/kyverno/kyverno/pkg/client/listers/reports/v1" diff --git a/pkg/client/listers/kyverno/v1beta1/expansion_generated.go b/pkg/client/listers/kyverno/v1beta1/expansion_generated.go index 1d293ead38..c0c64aa3bc 100644 --- a/pkg/client/listers/kyverno/v1beta1/expansion_generated.go +++ b/pkg/client/listers/kyverno/v1beta1/expansion_generated.go @@ -17,3 +17,11 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. package v1beta1 + +// UpdateRequestListerExpansion allows custom methods to be added to +// UpdateRequestLister. +type UpdateRequestListerExpansion interface{} + +// UpdateRequestNamespaceListerExpansion allows custom methods to be added to +// UpdateRequestNamespaceLister. +type UpdateRequestNamespaceListerExpansion interface{} diff --git a/pkg/client/listers/kyverno/v1beta1/updaterequest_expansion.go b/pkg/client/listers/kyverno/v1beta1/updaterequest_expansion.go deleted file mode 100644 index da1cf6c62f..0000000000 --- a/pkg/client/listers/kyverno/v1beta1/updaterequest_expansion.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" - "k8s.io/apimachinery/pkg/labels" -) - -type UpdateRequestListerExpansion interface{} - -type UpdateRequestNamespaceListerExpansion interface { - GetUpdateRequestsForClusterPolicy(policy string) ([]*v1beta1.UpdateRequest, error) -} - -func (s updateRequestNamespaceLister) GetUpdateRequestsForClusterPolicy(policy string) ([]*v1beta1.UpdateRequest, error) { - var list []*v1beta1.UpdateRequest - urs, err := s.List(labels.NewSelector()) - if err != nil { - return nil, err - } - for idx, ur := range urs { - if ur.Spec.GetPolicyKey() == policy { - list = append(list, urs[idx]) - } - } - return list, err -} diff --git a/pkg/client/listers/reports/v1/admissionreport.go b/pkg/client/listers/reports/v1/admissionreport.go index 8c64286977..0d0280eee1 100644 --- a/pkg/client/listers/reports/v1/admissionreport.go +++ b/pkg/client/listers/reports/v1/admissionreport.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/reports/v1/backgroundscanreport.go b/pkg/client/listers/reports/v1/backgroundscanreport.go index 9462a4146b..218ec233ab 100644 --- a/pkg/client/listers/reports/v1/backgroundscanreport.go +++ b/pkg/client/listers/reports/v1/backgroundscanreport.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/reports/v1/clusteradmissionreport.go b/pkg/client/listers/reports/v1/clusteradmissionreport.go index 3eda22266d..1ef0481d50 100644 --- a/pkg/client/listers/reports/v1/clusteradmissionreport.go +++ b/pkg/client/listers/reports/v1/clusteradmissionreport.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/reports/v1/clusterbackgroundscanreport.go b/pkg/client/listers/reports/v1/clusterbackgroundscanreport.go index 9aaf3a49a6..b16b819711 100644 --- a/pkg/client/listers/reports/v1/clusterbackgroundscanreport.go +++ b/pkg/client/listers/reports/v1/clusterbackgroundscanreport.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + v1 "github.com/kyverno/kyverno/api/reports/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/clients/kyverno/reportsv1/admissionreports/resource.generated.go b/pkg/clients/kyverno/reportsv1/admissionreports/resource.generated.go index 52b16766fa..278b72361c 100644 --- a/pkg/clients/kyverno/reportsv1/admissionreports/resource.generated.go +++ b/pkg/clients/kyverno/reportsv1/admissionreports/resource.generated.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-logr/logr" - github_com_kyverno_kyverno_api_kyverno_reports_v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + github_com_kyverno_kyverno_api_reports_v1 "github.com/kyverno/kyverno/api/reports/v1" github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_reports_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/reports/v1" "github.com/kyverno/kyverno/pkg/metrics" "github.com/kyverno/kyverno/pkg/tracing" @@ -34,7 +34,7 @@ type withLogging struct { logger logr.Logger } -func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Create") ret0, ret1 := c.inner.Create(arg0, arg1, arg2) @@ -67,7 +67,7 @@ func (c *withLogging) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Get") ret0, ret1 := c.inner.Get(arg0, arg1, arg2) @@ -78,7 +78,7 @@ func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReportList, error) { +func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReportList, error) { start := time.Now() logger := c.logger.WithValues("operation", "List") ret0, ret1 := c.inner.List(arg0, arg1) @@ -89,7 +89,7 @@ func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Patch") ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) @@ -100,7 +100,7 @@ func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Update") ret0, ret1 := c.inner.Update(arg0, arg1, arg2) @@ -128,7 +128,7 @@ type withMetrics struct { recorder metrics.Recorder } -func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "create") return c.inner.Create(arg0, arg1, arg2) } @@ -140,19 +140,19 @@ func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach defer c.recorder.RecordWithContext(arg0, "delete_collection") return c.inner.DeleteCollection(arg0, arg1, arg2) } -func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "get") return c.inner.Get(arg0, arg1, arg2) } -func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReportList, error) { +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReportList, error) { defer c.recorder.RecordWithContext(arg0, "list") return c.inner.List(arg0, arg1) } -func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "patch") return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) } -func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "update") return c.inner.Update(arg0, arg1, arg2) } @@ -167,7 +167,7 @@ type withTracing struct { kind string } -func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -230,7 +230,7 @@ func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -251,7 +251,7 @@ func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReportList, error) { +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReportList, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -272,7 +272,7 @@ func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -293,7 +293,7 @@ func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.AdmissionReport, error) { +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.AdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( diff --git a/pkg/clients/kyverno/reportsv1/backgroundscanreports/resource.generated.go b/pkg/clients/kyverno/reportsv1/backgroundscanreports/resource.generated.go index dc4794974a..508f3e35f3 100644 --- a/pkg/clients/kyverno/reportsv1/backgroundscanreports/resource.generated.go +++ b/pkg/clients/kyverno/reportsv1/backgroundscanreports/resource.generated.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-logr/logr" - github_com_kyverno_kyverno_api_kyverno_reports_v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + github_com_kyverno_kyverno_api_reports_v1 "github.com/kyverno/kyverno/api/reports/v1" github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_reports_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/reports/v1" "github.com/kyverno/kyverno/pkg/metrics" "github.com/kyverno/kyverno/pkg/tracing" @@ -34,7 +34,7 @@ type withLogging struct { logger logr.Logger } -func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Create") ret0, ret1 := c.inner.Create(arg0, arg1, arg2) @@ -67,7 +67,7 @@ func (c *withLogging) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Get") ret0, ret1 := c.inner.Get(arg0, arg1, arg2) @@ -78,7 +78,7 @@ func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReportList, error) { +func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReportList, error) { start := time.Now() logger := c.logger.WithValues("operation", "List") ret0, ret1 := c.inner.List(arg0, arg1) @@ -89,7 +89,7 @@ func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Patch") ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) @@ -100,7 +100,7 @@ func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Update") ret0, ret1 := c.inner.Update(arg0, arg1, arg2) @@ -128,7 +128,7 @@ type withMetrics struct { recorder metrics.Recorder } -func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "create") return c.inner.Create(arg0, arg1, arg2) } @@ -140,19 +140,19 @@ func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach defer c.recorder.RecordWithContext(arg0, "delete_collection") return c.inner.DeleteCollection(arg0, arg1, arg2) } -func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "get") return c.inner.Get(arg0, arg1, arg2) } -func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReportList, error) { +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReportList, error) { defer c.recorder.RecordWithContext(arg0, "list") return c.inner.List(arg0, arg1) } -func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "patch") return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) } -func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "update") return c.inner.Update(arg0, arg1, arg2) } @@ -167,7 +167,7 @@ type withTracing struct { kind string } -func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -230,7 +230,7 @@ func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -251,7 +251,7 @@ func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReportList, error) { +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReportList, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -272,7 +272,7 @@ func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -293,7 +293,7 @@ func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.BackgroundScanReport, error) { +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.BackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( diff --git a/pkg/clients/kyverno/reportsv1/clusteradmissionreports/resource.generated.go b/pkg/clients/kyverno/reportsv1/clusteradmissionreports/resource.generated.go index 665e72f4a9..a8ed2a5e00 100644 --- a/pkg/clients/kyverno/reportsv1/clusteradmissionreports/resource.generated.go +++ b/pkg/clients/kyverno/reportsv1/clusteradmissionreports/resource.generated.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-logr/logr" - github_com_kyverno_kyverno_api_kyverno_reports_v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + github_com_kyverno_kyverno_api_reports_v1 "github.com/kyverno/kyverno/api/reports/v1" github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_reports_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/reports/v1" "github.com/kyverno/kyverno/pkg/metrics" "github.com/kyverno/kyverno/pkg/tracing" @@ -34,7 +34,7 @@ type withLogging struct { logger logr.Logger } -func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Create") ret0, ret1 := c.inner.Create(arg0, arg1, arg2) @@ -67,7 +67,7 @@ func (c *withLogging) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Get") ret0, ret1 := c.inner.Get(arg0, arg1, arg2) @@ -78,7 +78,7 @@ func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReportList, error) { +func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReportList, error) { start := time.Now() logger := c.logger.WithValues("operation", "List") ret0, ret1 := c.inner.List(arg0, arg1) @@ -89,7 +89,7 @@ func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Patch") ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) @@ -100,7 +100,7 @@ func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Update") ret0, ret1 := c.inner.Update(arg0, arg1, arg2) @@ -128,7 +128,7 @@ type withMetrics struct { recorder metrics.Recorder } -func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "create") return c.inner.Create(arg0, arg1, arg2) } @@ -140,19 +140,19 @@ func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach defer c.recorder.RecordWithContext(arg0, "delete_collection") return c.inner.DeleteCollection(arg0, arg1, arg2) } -func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "get") return c.inner.Get(arg0, arg1, arg2) } -func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReportList, error) { +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReportList, error) { defer c.recorder.RecordWithContext(arg0, "list") return c.inner.List(arg0, arg1) } -func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "patch") return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) } -func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { defer c.recorder.RecordWithContext(arg0, "update") return c.inner.Update(arg0, arg1, arg2) } @@ -167,7 +167,7 @@ type withTracing struct { kind string } -func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -230,7 +230,7 @@ func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -251,7 +251,7 @@ func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReportList, error) { +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReportList, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -272,7 +272,7 @@ func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -293,7 +293,7 @@ func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterAdmissionReport, error) { +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterAdmissionReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( diff --git a/pkg/clients/kyverno/reportsv1/clusterbackgroundscanreports/resource.generated.go b/pkg/clients/kyverno/reportsv1/clusterbackgroundscanreports/resource.generated.go index 0777c3beac..448b750acd 100644 --- a/pkg/clients/kyverno/reportsv1/clusterbackgroundscanreports/resource.generated.go +++ b/pkg/clients/kyverno/reportsv1/clusterbackgroundscanreports/resource.generated.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-logr/logr" - github_com_kyverno_kyverno_api_kyverno_reports_v1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" + github_com_kyverno_kyverno_api_reports_v1 "github.com/kyverno/kyverno/api/reports/v1" github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_reports_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/reports/v1" "github.com/kyverno/kyverno/pkg/metrics" "github.com/kyverno/kyverno/pkg/tracing" @@ -34,7 +34,7 @@ type withLogging struct { logger logr.Logger } -func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withLogging) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Create") ret0, ret1 := c.inner.Create(arg0, arg1, arg2) @@ -67,7 +67,7 @@ func (c *withLogging) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Get") ret0, ret1 := c.inner.Get(arg0, arg1, arg2) @@ -78,7 +78,7 @@ func (c *withLogging) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReportList, error) { +func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReportList, error) { start := time.Now() logger := c.logger.WithValues("operation", "List") ret0, ret1 := c.inner.List(arg0, arg1) @@ -89,7 +89,7 @@ func (c *withLogging) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Patch") ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) @@ -100,7 +100,7 @@ func (c *withLogging) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withLogging) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { start := time.Now() logger := c.logger.WithValues("operation", "Update") ret0, ret1 := c.inner.Update(arg0, arg1, arg2) @@ -128,7 +128,7 @@ type withMetrics struct { recorder metrics.Recorder } -func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "create") return c.inner.Create(arg0, arg1, arg2) } @@ -140,19 +140,19 @@ func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach defer c.recorder.RecordWithContext(arg0, "delete_collection") return c.inner.DeleteCollection(arg0, arg1, arg2) } -func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "get") return c.inner.Get(arg0, arg1, arg2) } -func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReportList, error) { +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReportList, error) { defer c.recorder.RecordWithContext(arg0, "list") return c.inner.List(arg0, arg1) } -func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withMetrics) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "patch") return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) } -func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { defer c.recorder.RecordWithContext(arg0, "update") return c.inner.Update(arg0, arg1, arg2) } @@ -167,7 +167,7 @@ type withTracing struct { kind string } -func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -230,7 +230,7 @@ func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimach } return ret0 } -func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -251,7 +251,7 @@ func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimach } return ret0, ret1 } -func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReportList, error) { +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReportList, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -272,7 +272,7 @@ func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_ap } return ret0, ret1 } -func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_types.PatchType, arg3 []uint8, arg4 k8s_io_apimachinery_pkg_apis_meta_v1.PatchOptions, arg5 ...string) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( @@ -293,7 +293,7 @@ func (c *withTracing) Patch(arg0 context.Context, arg1 string, arg2 k8s_io_apima } return ret0, ret1 } -func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_reports_v1.ClusterBackgroundScanReport, error) { +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_reports_v1.ClusterBackgroundScanReport, error) { var span trace.Span if tracing.IsInSpan(arg0) { arg0, span = tracing.StartChildSpan( diff --git a/pkg/report/copy.go b/pkg/report/copy.go index 2c28eeaadc..f09089fe95 100644 --- a/pkg/report/copy.go +++ b/pkg/report/copy.go @@ -1,9 +1,9 @@ package report import ( - reportv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" ) func deepCopyV1Alpha2(report kyvernov1alpha2.ReportInterface) kyvernov1alpha2.ReportInterface { @@ -27,13 +27,13 @@ func deepCopyV1Alpha2(report kyvernov1alpha2.ReportInterface) kyvernov1alpha2.Re func deepCopyReportV1(report kyvernov1alpha2.ReportInterface) kyvernov1alpha2.ReportInterface { switch v := report.(type) { - case *reportv1.AdmissionReport: + case *reportsv1.AdmissionReport: return v.DeepCopy() - case *reportv1.ClusterAdmissionReport: + case *reportsv1.ClusterAdmissionReport: return v.DeepCopy() - case *reportv1.BackgroundScanReport: + case *reportsv1.BackgroundScanReport: return v.DeepCopy() - case *reportv1.ClusterBackgroundScanReport: + case *reportsv1.ClusterBackgroundScanReport: return v.DeepCopy() case *policyreportv1alpha2.PolicyReport: return v.DeepCopy() diff --git a/pkg/report/create.go b/pkg/report/create.go index 978e80374b..5ffab2538f 100644 --- a/pkg/report/create.go +++ b/pkg/report/create.go @@ -4,9 +4,9 @@ import ( "context" "errors" - reportv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" "github.com/kyverno/kyverno/pkg/client/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -38,16 +38,16 @@ func createV1Alpha1Report(ctx context.Context, report kyvernov1alpha2.ReportInte func createReportV1Report(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) (kyvernov1alpha2.ReportInterface, error) { switch v := report.(type) { - case *reportv1.AdmissionReport: + case *reportsv1.AdmissionReport: report, err := client.ReportsV1().AdmissionReports(report.GetNamespace()).Create(ctx, v, metav1.CreateOptions{}) return report, err - case *reportv1.ClusterAdmissionReport: + case *reportsv1.ClusterAdmissionReport: report, err := client.ReportsV1().ClusterAdmissionReports().Create(ctx, v, metav1.CreateOptions{}) return report, err - case *reportv1.BackgroundScanReport: + case *reportsv1.BackgroundScanReport: report, err := client.ReportsV1().BackgroundScanReports(report.GetNamespace()).Create(ctx, v, metav1.CreateOptions{}) return report, err - case *reportv1.ClusterBackgroundScanReport: + case *reportsv1.ClusterBackgroundScanReport: report, err := client.ReportsV1().ClusterBackgroundScanReports().Create(ctx, v, metav1.CreateOptions{}) return report, err case *policyreportv1alpha2.PolicyReport: diff --git a/pkg/report/delete.go b/pkg/report/delete.go index e7f01f85a5..0d200dfd72 100644 --- a/pkg/report/delete.go +++ b/pkg/report/delete.go @@ -4,9 +4,9 @@ import ( "context" "errors" - reportv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" "github.com/kyverno/kyverno/pkg/client/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -32,13 +32,13 @@ func deleteV1Alpha1Reports(ctx context.Context, report kyvernov1alpha2.ReportInt func deleteReportV1Reports(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) error { switch v := report.(type) { - case *reportv1.AdmissionReport: + case *reportsv1.AdmissionReport: return client.ReportsV1().AdmissionReports(report.GetNamespace()).Delete(ctx, v.GetName(), metav1.DeleteOptions{}) - case *reportv1.ClusterAdmissionReport: + case *reportsv1.ClusterAdmissionReport: return client.ReportsV1().ClusterAdmissionReports().Delete(ctx, v.GetName(), metav1.DeleteOptions{}) - case *reportv1.BackgroundScanReport: + case *reportsv1.BackgroundScanReport: return client.ReportsV1().BackgroundScanReports(report.GetNamespace()).Delete(ctx, v.GetName(), metav1.DeleteOptions{}) - case *reportv1.ClusterBackgroundScanReport: + case *reportsv1.ClusterBackgroundScanReport: return client.ReportsV1().ClusterBackgroundScanReports().Delete(ctx, v.GetName(), metav1.DeleteOptions{}) case *policyreportv1alpha2.PolicyReport: return client.Wgpolicyk8sV1alpha2().PolicyReports(report.GetNamespace()).Delete(ctx, v.GetName(), metav1.DeleteOptions{}) diff --git a/pkg/report/new.go b/pkg/report/new.go index 4d09330938..3f26c93db9 100644 --- a/pkg/report/new.go +++ b/pkg/report/new.go @@ -1,9 +1,9 @@ package report import ( - reportv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" kyvernov2 "github.com/kyverno/kyverno/api/kyverno/v2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" engineapi "github.com/kyverno/kyverno/pkg/engine/api" controllerutils "github.com/kyverno/kyverno/pkg/utils/controller" reportutils "github.com/kyverno/kyverno/pkg/utils/report" @@ -38,9 +38,9 @@ func buildAdmissionReportV1Alpha1(resource unstructured.Unstructured, request ad func newAdmissionReportReportV1(namespace, name string, gvr schema.GroupVersionResource, resource unstructured.Unstructured) kyvernov1alpha2.ReportInterface { var report kyvernov1alpha2.ReportInterface if namespace == "" { - report = &reportv1.ClusterAdmissionReport{Spec: reportv1.AdmissionReportSpec{}} + report = &reportsv1.ClusterAdmissionReport{Spec: reportsv1.AdmissionReportSpec{}} } else { - report = &reportv1.AdmissionReport{Spec: reportv1.AdmissionReportSpec{}} + report = &reportsv1.AdmissionReport{Spec: reportsv1.AdmissionReportSpec{}} } report.SetName(name) report.SetNamespace(namespace) @@ -75,9 +75,9 @@ func newBackgroundScanReportV1Alpha1(namespace, name string, gvk schema.GroupVer func newBackgroundScanReportReportsV1(namespace, name string, gvk schema.GroupVersionKind, owner string, uid types.UID) kyvernov1alpha2.ReportInterface { var report kyvernov1alpha2.ReportInterface if namespace == "" { - report = &reportv1.ClusterBackgroundScanReport{} + report = &reportsv1.ClusterBackgroundScanReport{} } else { - report = &reportv1.BackgroundScanReport{} + report = &reportsv1.BackgroundScanReport{} } report.SetName(name) report.SetNamespace(namespace) diff --git a/pkg/report/report_manager.go b/pkg/report/report_manager.go index 9eaed635b2..d8acc00a5a 100644 --- a/pkg/report/report_manager.go +++ b/pkg/report/report_manager.go @@ -3,8 +3,8 @@ package report import ( "context" - reportv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" "github.com/kyverno/kyverno/pkg/client/clientset/versioned" engineapi "github.com/kyverno/kyverno/pkg/engine/api" admissionv1 "k8s.io/api/admission/v1" @@ -208,7 +208,7 @@ func (r *reportManager) NewBackgroundScanReport(namespace, name string, gvk sche func (r *reportManager) AdmissionReportInformer(metadataFactory metadatainformers.SharedInformerFactory) informers.GenericInformer { if r.storeInDB { - return metadataFactory.ForResource(reportv1.SchemeGroupVersion.WithResource("admissionreports")) + return metadataFactory.ForResource(reportsv1.SchemeGroupVersion.WithResource("admissionreports")) } else { return metadataFactory.ForResource(kyvernov1alpha2.SchemeGroupVersion.WithResource("admissionreports")) } @@ -216,7 +216,7 @@ func (r *reportManager) AdmissionReportInformer(metadataFactory metadatainformer func (r *reportManager) ClusterAdmissionReportInformer(metadataFactory metadatainformers.SharedInformerFactory) informers.GenericInformer { if r.storeInDB { - return metadataFactory.ForResource(reportv1.SchemeGroupVersion.WithResource("clusteradmissionreports")) + return metadataFactory.ForResource(reportsv1.SchemeGroupVersion.WithResource("clusteradmissionreports")) } else { return metadataFactory.ForResource(kyvernov1alpha2.SchemeGroupVersion.WithResource("clusteradmissionreports")) } @@ -224,7 +224,7 @@ func (r *reportManager) ClusterAdmissionReportInformer(metadataFactory metadatai func (r *reportManager) BackgroundScanReportInformer(metadataFactory metadatainformers.SharedInformerFactory) informers.GenericInformer { if r.storeInDB { - return metadataFactory.ForResource(reportv1.SchemeGroupVersion.WithResource("backgroundscanreports")) + return metadataFactory.ForResource(reportsv1.SchemeGroupVersion.WithResource("backgroundscanreports")) } else { return metadataFactory.ForResource(kyvernov1alpha2.SchemeGroupVersion.WithResource("backgroundscanreports")) } @@ -232,7 +232,7 @@ func (r *reportManager) BackgroundScanReportInformer(metadataFactory metadatainf func (r *reportManager) ClusterBackgroundScanReportInformer(metadataFactory metadatainformers.SharedInformerFactory) informers.GenericInformer { if r.storeInDB { - return metadataFactory.ForResource(reportv1.SchemeGroupVersion.WithResource("clusterbackgroundscanreports")) + return metadataFactory.ForResource(reportsv1.SchemeGroupVersion.WithResource("clusterbackgroundscanreports")) } else { return metadataFactory.ForResource(kyvernov1alpha2.SchemeGroupVersion.WithResource("clusterbackgroundscanreports")) } diff --git a/pkg/report/update.go b/pkg/report/update.go index 5532c852d5..67ac7bd7c5 100644 --- a/pkg/report/update.go +++ b/pkg/report/update.go @@ -4,9 +4,9 @@ import ( "context" "errors" - reportv1 "github.com/kyverno/kyverno/api/kyverno/reports/v1" kyvernov1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + reportsv1 "github.com/kyverno/kyverno/api/reports/v1" "github.com/kyverno/kyverno/pkg/client/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -38,16 +38,16 @@ func updateV1Alpha1Report(ctx context.Context, report kyvernov1alpha2.ReportInte func updateReportsV1Report(ctx context.Context, report kyvernov1alpha2.ReportInterface, client versioned.Interface) (kyvernov1alpha2.ReportInterface, error) { switch v := report.(type) { - case *reportv1.AdmissionReport: + case *reportsv1.AdmissionReport: report, err := client.ReportsV1().AdmissionReports(report.GetNamespace()).Update(ctx, v, metav1.UpdateOptions{}) return report, err - case *reportv1.ClusterAdmissionReport: + case *reportsv1.ClusterAdmissionReport: report, err := client.ReportsV1().ClusterAdmissionReports().Update(ctx, v, metav1.UpdateOptions{}) return report, err - case *reportv1.BackgroundScanReport: + case *reportsv1.BackgroundScanReport: report, err := client.ReportsV1().BackgroundScanReports(report.GetNamespace()).Update(ctx, v, metav1.UpdateOptions{}) return report, err - case *reportv1.ClusterBackgroundScanReport: + case *reportsv1.ClusterBackgroundScanReport: report, err := client.ReportsV1().ClusterBackgroundScanReports().Update(ctx, v, metav1.UpdateOptions{}) return report, err case *policyreportv1alpha2.PolicyReport: