From 447360c1f39ed0202036abebeae8b7f4cfa3a62f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Tue, 22 Nov 2022 10:10:07 +0100 Subject: [PATCH] refactor: improve instrumented clients code and support dynamic/metadata client (#5428) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: improve instrumented clients creation Signed-off-by: Charles-Edouard Brétéché * fix Signed-off-by: Charles-Edouard Brétéché * refactor: instrumented clients code part 3 Signed-off-by: Charles-Edouard Brétéché * fix Signed-off-by: Charles-Edouard Brétéché * fix Signed-off-by: Charles-Edouard Brétéché * fix Signed-off-by: Charles-Edouard Brétéché * fix Signed-off-by: Charles-Edouard Brétéché * fix Signed-off-by: Charles-Edouard Brétéché * metadata Signed-off-by: Charles-Edouard Brétéché * metadata Signed-off-by: Charles-Edouard Brétéché Signed-off-by: Charles-Edouard Brétéché --- cmd/internal/client.go | 53 + cmd/internal/config.go | 16 +- cmd/internal/flag.go | 14 + hack/main.go | 801 +- pkg/clients/dclient/client.go | 10 +- pkg/clients/dynamic/client.go | 77 + pkg/clients/dynamic/interface.generated.go | 73 + .../dynamic/resource/resource.generated.go | 279 + .../client.generated.go | 50 + .../resource.generated.go | 236 + .../resource.generated.go | 236 + .../client.generated.go | 50 + .../resource.generated.go | 236 + .../resource.generated.go | 236 + pkg/clients/kube/appsv1/client.generated.go | 74 + .../controllerrevisions/resource.generated.go | 236 + .../appsv1/daemonsets/resource.generated.go | 280 + .../appsv1/deployments/resource.generated.go | 348 + .../appsv1/replicasets/resource.generated.go | 348 + .../appsv1/statefulsets/resource.generated.go | 348 + .../kube/appsv1beta1/client.generated.go | 58 + .../controllerrevisions/resource.generated.go | 236 + .../deployments/resource.generated.go | 280 + .../statefulsets/resource.generated.go | 280 + .../kube/appsv1beta2/client.generated.go | 74 + .../controllerrevisions/resource.generated.go | 236 + .../daemonsets/resource.generated.go | 280 + .../deployments/resource.generated.go | 280 + .../replicasets/resource.generated.go | 280 + .../statefulsets/resource.generated.go | 346 + .../kube/authenticationv1/client.generated.go | 42 + .../tokenreviews/resource.generated.go | 57 + .../authenticationv1beta1/client.generated.go | 42 + .../tokenreviews/resource.generated.go | 57 + .../kube/authorizationv1/client.generated.go | 66 + .../resource.generated.go | 57 + .../resource.generated.go | 57 + .../resource.generated.go | 57 + .../resource.generated.go | 57 + .../authorizationv1beta1/client.generated.go | 66 + .../resource.generated.go | 57 + .../resource.generated.go | 57 + .../resource.generated.go | 57 + .../resource.generated.go | 57 + .../kube/autoscalingv1/client.generated.go | 42 + .../resource.generated.go | 280 + .../kube/autoscalingv2/client.generated.go | 42 + .../resource.generated.go | 280 + .../autoscalingv2beta1/client.generated.go | 42 + .../resource.generated.go | 280 + .../autoscalingv2beta2/client.generated.go | 42 + .../resource.generated.go | 280 + pkg/clients/kube/batchv1/client.generated.go | 50 + .../batchv1/cronjobs/resource.generated.go | 280 + .../kube/batchv1/jobs/resource.generated.go | 280 + .../kube/batchv1beta1/client.generated.go | 42 + .../cronjobs/resource.generated.go | 280 + .../resource.generated.go | 302 + .../kube/certificatesv1/client.generated.go | 42 + .../resource.generated.go | 302 + .../certificatesv1beta1/client.generated.go | 42 + pkg/clients/kube/clientset.generated.go | 446 +- .../kube/coordinationv1/client.generated.go | 42 + .../leases/resource.generated.go | 236 + .../coordinationv1beta1/client.generated.go | 42 + .../leases/resource.generated.go | 236 + pkg/clients/kube/corev1/client.generated.go | 162 + .../componentstatuses/resource.generated.go | 236 + .../corev1/configmaps/resource.generated.go | 236 + .../corev1/endpoints/resource.generated.go | 236 + .../kube/corev1/events/resource.generated.go | 278 + .../corev1/limitranges/resource.generated.go | 236 + .../corev1/namespaces/resource.generated.go | 280 + .../kube/corev1/nodes/resource.generated.go | 302 + .../resource.generated.go | 280 + .../persistentvolumes/resource.generated.go | 280 + .../kube/corev1/pods/resource.generated.go | 409 + .../corev1/podtemplates/resource.generated.go | 236 + .../resource.generated.go | 325 + .../resourcequotas/resource.generated.go | 280 + .../kube/corev1/secrets/resource.generated.go | 236 + .../serviceaccounts/resource.generated.go | 259 + .../corev1/services/resource.generated.go | 267 + .../kube/discoveryv1/client.generated.go | 42 + .../endpointslices/resource.generated.go | 236 + .../kube/discoveryv1beta1/client.generated.go | 42 + .../endpointslices/resource.generated.go | 236 + pkg/clients/kube/eventsv1/client.generated.go | 42 + .../eventsv1/events/resource.generated.go | 236 + .../kube/eventsv1beta1/client.generated.go | 42 + .../events/resource.generated.go | 260 + .../extensionsv1beta1/client.generated.go | 82 + .../daemonsets/resource.generated.go | 280 + .../deployments/resource.generated.go | 368 + .../ingresses/resource.generated.go | 280 + .../networkpolicies/resource.generated.go | 280 + .../podsecuritypolicies/resource.generated.go | 236 + .../replicasets/resource.generated.go | 346 + .../flowcontrolv1alpha1/client.generated.go | 50 + .../flowschemas/resource.generated.go | 280 + .../resource.generated.go | 280 + .../flowcontrolv1beta1/client.generated.go | 50 + .../flowschemas/resource.generated.go | 280 + .../resource.generated.go | 280 + .../flowcontrolv1beta2/client.generated.go | 50 + .../flowschemas/resource.generated.go | 280 + .../resource.generated.go | 280 + pkg/clients/kube/interface.generated.go | 73 + .../kube/internalv1alpha1/client.generated.go | 42 + .../storageversions/resource.generated.go | 280 + .../kube/networkingv1/client.generated.go | 58 + .../ingressclasses/resource.generated.go | 236 + .../ingresses/resource.generated.go | 280 + .../networkpolicies/resource.generated.go | 280 + .../networkingv1alpha1/client.generated.go | 42 + .../clustercidrs/resource.generated.go | 236 + .../networkingv1beta1/client.generated.go | 50 + .../ingressclasses/resource.generated.go | 236 + .../ingresses/resource.generated.go | 280 + pkg/clients/kube/nodev1/client.generated.go | 42 + .../runtimeclasses/resource.generated.go | 236 + .../kube/nodev1alpha1/client.generated.go | 42 + .../runtimeclasses/resource.generated.go | 236 + .../kube/nodev1beta1/client.generated.go | 42 + .../runtimeclasses/resource.generated.go | 236 + pkg/clients/kube/policyv1/client.generated.go | 50 + .../policyv1/evictions/resource.generated.go | 56 + .../resource.generated.go | 280 + .../kube/policyv1beta1/client.generated.go | 58 + .../evictions/resource.generated.go | 56 + .../resource.generated.go | 280 + .../podsecuritypolicies/resource.generated.go | 236 + pkg/clients/kube/rbacv1/client.generated.go | 66 + .../clusterrolebindings/resource.generated.go | 236 + .../rbacv1/clusterroles/resource.generated.go | 236 + .../rbacv1/rolebindings/resource.generated.go | 236 + .../kube/rbacv1/roles/resource.generated.go | 236 + .../kube/rbacv1alpha1/client.generated.go | 66 + .../clusterrolebindings/resource.generated.go | 236 + .../clusterroles/resource.generated.go | 236 + .../rolebindings/resource.generated.go | 236 + .../rbacv1alpha1/roles/resource.generated.go | 236 + .../kube/rbacv1beta1/client.generated.go | 66 + .../clusterrolebindings/resource.generated.go | 236 + .../clusterroles/resource.generated.go | 236 + .../rolebindings/resource.generated.go | 236 + .../rbacv1beta1/roles/resource.generated.go | 236 + .../kube/schedulingv1/client.generated.go | 42 + .../priorityclasses/resource.generated.go | 236 + .../schedulingv1alpha1/client.generated.go | 42 + .../priorityclasses/resource.generated.go | 236 + .../schedulingv1beta1/client.generated.go | 42 + .../priorityclasses/resource.generated.go | 236 + .../kube/storagev1/client.generated.go | 74 + .../csidrivers/resource.generated.go | 236 + .../storagev1/csinodes/resource.generated.go | 236 + .../resource.generated.go | 236 + .../storageclasses/resource.generated.go | 236 + .../volumeattachments/resource.generated.go | 280 + .../kube/storagev1alpha1/client.generated.go | 50 + .../resource.generated.go | 236 + .../volumeattachments/resource.generated.go | 280 + .../kube/storagev1beta1/client.generated.go | 74 + .../csidrivers/resource.generated.go | 236 + .../csinodes/resource.generated.go | 236 + .../resource.generated.go | 236 + .../storageclasses/resource.generated.go | 236 + .../volumeattachments/resource.generated.go | 280 + pkg/clients/kyverno/clientset.generated.go | 118 +- pkg/clients/kyverno/interface.generated.go | 73 + .../kyverno/kyvernov1/client.generated.go | 58 + .../clusterpolicies/resource.generated.go | 235 + .../generaterequests/resource.generated.go | 235 + .../kyvernov1/policies/resource.generated.go | 235 + .../cleanuppolicies/resource.generated.go | 235 + .../kyvernov1alpha1/client.generated.go | 50 + .../resource.generated.go | 235 + .../admissionreports/resource.generated.go | 213 + .../resource.generated.go | 213 + .../kyvernov1alpha2/client.generated.go | 66 + .../resource.generated.go | 213 + .../resource.generated.go | 213 + .../kyvernov1beta1/client.generated.go | 42 + .../updaterequests/resource.generated.go | 235 + .../wgpolicyk8sv1alpha2/client.generated.go | 50 + .../resource.generated.go | 213 + .../policyreports/resource.generated.go | 213 + pkg/clients/metadata/client.go | 77 + pkg/clients/metadata/interface.generated.go | 73 + .../metadata/resource/resource.generated.go | 168 + .../metrics/kube/clientset.generated.go | 6884 ----- .../metrics/kyverno/clientset.generated.go | 721 - .../tracing/kube/clientset.generated.go | 21060 ---------------- .../tracing/kyverno/clientset.generated.go | 2117 -- 194 files changed, 34313 insertions(+), 31324 deletions(-) create mode 100644 cmd/internal/client.go create mode 100644 pkg/clients/dynamic/client.go create mode 100644 pkg/clients/dynamic/interface.generated.go create mode 100644 pkg/clients/dynamic/resource/resource.generated.go create mode 100644 pkg/clients/kube/admissionregistrationv1/client.generated.go create mode 100644 pkg/clients/kube/admissionregistrationv1/mutatingwebhookconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/admissionregistrationv1/validatingwebhookconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/admissionregistrationv1beta1/client.generated.go create mode 100644 pkg/clients/kube/admissionregistrationv1beta1/mutatingwebhookconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/admissionregistrationv1beta1/validatingwebhookconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/appsv1/client.generated.go create mode 100644 pkg/clients/kube/appsv1/controllerrevisions/resource.generated.go create mode 100644 pkg/clients/kube/appsv1/daemonsets/resource.generated.go create mode 100644 pkg/clients/kube/appsv1/deployments/resource.generated.go create mode 100644 pkg/clients/kube/appsv1/replicasets/resource.generated.go create mode 100644 pkg/clients/kube/appsv1/statefulsets/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta1/client.generated.go create mode 100644 pkg/clients/kube/appsv1beta1/controllerrevisions/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta1/deployments/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta1/statefulsets/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta2/client.generated.go create mode 100644 pkg/clients/kube/appsv1beta2/controllerrevisions/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta2/daemonsets/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta2/deployments/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta2/replicasets/resource.generated.go create mode 100644 pkg/clients/kube/appsv1beta2/statefulsets/resource.generated.go create mode 100644 pkg/clients/kube/authenticationv1/client.generated.go create mode 100644 pkg/clients/kube/authenticationv1/tokenreviews/resource.generated.go create mode 100644 pkg/clients/kube/authenticationv1beta1/client.generated.go create mode 100644 pkg/clients/kube/authenticationv1beta1/tokenreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1/client.generated.go create mode 100644 pkg/clients/kube/authorizationv1/localsubjectaccessreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1/selfsubjectaccessreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1/selfsubjectrulesreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1/subjectaccessreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1beta1/client.generated.go create mode 100644 pkg/clients/kube/authorizationv1beta1/localsubjectaccessreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1beta1/selfsubjectaccessreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1beta1/selfsubjectrulesreviews/resource.generated.go create mode 100644 pkg/clients/kube/authorizationv1beta1/subjectaccessreviews/resource.generated.go create mode 100644 pkg/clients/kube/autoscalingv1/client.generated.go create mode 100644 pkg/clients/kube/autoscalingv1/horizontalpodautoscalers/resource.generated.go create mode 100644 pkg/clients/kube/autoscalingv2/client.generated.go create mode 100644 pkg/clients/kube/autoscalingv2/horizontalpodautoscalers/resource.generated.go create mode 100644 pkg/clients/kube/autoscalingv2beta1/client.generated.go create mode 100644 pkg/clients/kube/autoscalingv2beta1/horizontalpodautoscalers/resource.generated.go create mode 100644 pkg/clients/kube/autoscalingv2beta2/client.generated.go create mode 100644 pkg/clients/kube/autoscalingv2beta2/horizontalpodautoscalers/resource.generated.go create mode 100644 pkg/clients/kube/batchv1/client.generated.go create mode 100644 pkg/clients/kube/batchv1/cronjobs/resource.generated.go create mode 100644 pkg/clients/kube/batchv1/jobs/resource.generated.go create mode 100644 pkg/clients/kube/batchv1beta1/client.generated.go create mode 100644 pkg/clients/kube/batchv1beta1/cronjobs/resource.generated.go create mode 100644 pkg/clients/kube/certificatesv1/certificatesigningrequests/resource.generated.go create mode 100644 pkg/clients/kube/certificatesv1/client.generated.go create mode 100644 pkg/clients/kube/certificatesv1beta1/certificatesigningrequests/resource.generated.go create mode 100644 pkg/clients/kube/certificatesv1beta1/client.generated.go create mode 100644 pkg/clients/kube/coordinationv1/client.generated.go create mode 100644 pkg/clients/kube/coordinationv1/leases/resource.generated.go create mode 100644 pkg/clients/kube/coordinationv1beta1/client.generated.go create mode 100644 pkg/clients/kube/coordinationv1beta1/leases/resource.generated.go create mode 100644 pkg/clients/kube/corev1/client.generated.go create mode 100644 pkg/clients/kube/corev1/componentstatuses/resource.generated.go create mode 100644 pkg/clients/kube/corev1/configmaps/resource.generated.go create mode 100644 pkg/clients/kube/corev1/endpoints/resource.generated.go create mode 100644 pkg/clients/kube/corev1/events/resource.generated.go create mode 100644 pkg/clients/kube/corev1/limitranges/resource.generated.go create mode 100644 pkg/clients/kube/corev1/namespaces/resource.generated.go create mode 100644 pkg/clients/kube/corev1/nodes/resource.generated.go create mode 100644 pkg/clients/kube/corev1/persistentvolumeclaims/resource.generated.go create mode 100644 pkg/clients/kube/corev1/persistentvolumes/resource.generated.go create mode 100644 pkg/clients/kube/corev1/pods/resource.generated.go create mode 100644 pkg/clients/kube/corev1/podtemplates/resource.generated.go create mode 100644 pkg/clients/kube/corev1/replicationcontrollers/resource.generated.go create mode 100644 pkg/clients/kube/corev1/resourcequotas/resource.generated.go create mode 100644 pkg/clients/kube/corev1/secrets/resource.generated.go create mode 100644 pkg/clients/kube/corev1/serviceaccounts/resource.generated.go create mode 100644 pkg/clients/kube/corev1/services/resource.generated.go create mode 100644 pkg/clients/kube/discoveryv1/client.generated.go create mode 100644 pkg/clients/kube/discoveryv1/endpointslices/resource.generated.go create mode 100644 pkg/clients/kube/discoveryv1beta1/client.generated.go create mode 100644 pkg/clients/kube/discoveryv1beta1/endpointslices/resource.generated.go create mode 100644 pkg/clients/kube/eventsv1/client.generated.go create mode 100644 pkg/clients/kube/eventsv1/events/resource.generated.go create mode 100644 pkg/clients/kube/eventsv1beta1/client.generated.go create mode 100644 pkg/clients/kube/eventsv1beta1/events/resource.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/client.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/daemonsets/resource.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/deployments/resource.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/ingresses/resource.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/networkpolicies/resource.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/podsecuritypolicies/resource.generated.go create mode 100644 pkg/clients/kube/extensionsv1beta1/replicasets/resource.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1alpha1/client.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1alpha1/flowschemas/resource.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1alpha1/prioritylevelconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1beta1/client.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1beta1/flowschemas/resource.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1beta1/prioritylevelconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1beta2/client.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1beta2/flowschemas/resource.generated.go create mode 100644 pkg/clients/kube/flowcontrolv1beta2/prioritylevelconfigurations/resource.generated.go create mode 100644 pkg/clients/kube/interface.generated.go create mode 100644 pkg/clients/kube/internalv1alpha1/client.generated.go create mode 100644 pkg/clients/kube/internalv1alpha1/storageversions/resource.generated.go create mode 100644 pkg/clients/kube/networkingv1/client.generated.go create mode 100644 pkg/clients/kube/networkingv1/ingressclasses/resource.generated.go create mode 100644 pkg/clients/kube/networkingv1/ingresses/resource.generated.go create mode 100644 pkg/clients/kube/networkingv1/networkpolicies/resource.generated.go create mode 100644 pkg/clients/kube/networkingv1alpha1/client.generated.go create mode 100644 pkg/clients/kube/networkingv1alpha1/clustercidrs/resource.generated.go create mode 100644 pkg/clients/kube/networkingv1beta1/client.generated.go create mode 100644 pkg/clients/kube/networkingv1beta1/ingressclasses/resource.generated.go create mode 100644 pkg/clients/kube/networkingv1beta1/ingresses/resource.generated.go create mode 100644 pkg/clients/kube/nodev1/client.generated.go create mode 100644 pkg/clients/kube/nodev1/runtimeclasses/resource.generated.go create mode 100644 pkg/clients/kube/nodev1alpha1/client.generated.go create mode 100644 pkg/clients/kube/nodev1alpha1/runtimeclasses/resource.generated.go create mode 100644 pkg/clients/kube/nodev1beta1/client.generated.go create mode 100644 pkg/clients/kube/nodev1beta1/runtimeclasses/resource.generated.go create mode 100644 pkg/clients/kube/policyv1/client.generated.go create mode 100644 pkg/clients/kube/policyv1/evictions/resource.generated.go create mode 100644 pkg/clients/kube/policyv1/poddisruptionbudgets/resource.generated.go create mode 100644 pkg/clients/kube/policyv1beta1/client.generated.go create mode 100644 pkg/clients/kube/policyv1beta1/evictions/resource.generated.go create mode 100644 pkg/clients/kube/policyv1beta1/poddisruptionbudgets/resource.generated.go create mode 100644 pkg/clients/kube/policyv1beta1/podsecuritypolicies/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1/client.generated.go create mode 100644 pkg/clients/kube/rbacv1/clusterrolebindings/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1/clusterroles/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1/rolebindings/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1/roles/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1alpha1/client.generated.go create mode 100644 pkg/clients/kube/rbacv1alpha1/clusterrolebindings/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1alpha1/clusterroles/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1alpha1/rolebindings/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1alpha1/roles/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1beta1/client.generated.go create mode 100644 pkg/clients/kube/rbacv1beta1/clusterrolebindings/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1beta1/clusterroles/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1beta1/rolebindings/resource.generated.go create mode 100644 pkg/clients/kube/rbacv1beta1/roles/resource.generated.go create mode 100644 pkg/clients/kube/schedulingv1/client.generated.go create mode 100644 pkg/clients/kube/schedulingv1/priorityclasses/resource.generated.go create mode 100644 pkg/clients/kube/schedulingv1alpha1/client.generated.go create mode 100644 pkg/clients/kube/schedulingv1alpha1/priorityclasses/resource.generated.go create mode 100644 pkg/clients/kube/schedulingv1beta1/client.generated.go create mode 100644 pkg/clients/kube/schedulingv1beta1/priorityclasses/resource.generated.go create mode 100644 pkg/clients/kube/storagev1/client.generated.go create mode 100644 pkg/clients/kube/storagev1/csidrivers/resource.generated.go create mode 100644 pkg/clients/kube/storagev1/csinodes/resource.generated.go create mode 100644 pkg/clients/kube/storagev1/csistoragecapacities/resource.generated.go create mode 100644 pkg/clients/kube/storagev1/storageclasses/resource.generated.go create mode 100644 pkg/clients/kube/storagev1/volumeattachments/resource.generated.go create mode 100644 pkg/clients/kube/storagev1alpha1/client.generated.go create mode 100644 pkg/clients/kube/storagev1alpha1/csistoragecapacities/resource.generated.go create mode 100644 pkg/clients/kube/storagev1alpha1/volumeattachments/resource.generated.go create mode 100644 pkg/clients/kube/storagev1beta1/client.generated.go create mode 100644 pkg/clients/kube/storagev1beta1/csidrivers/resource.generated.go create mode 100644 pkg/clients/kube/storagev1beta1/csinodes/resource.generated.go create mode 100644 pkg/clients/kube/storagev1beta1/csistoragecapacities/resource.generated.go create mode 100644 pkg/clients/kube/storagev1beta1/storageclasses/resource.generated.go create mode 100644 pkg/clients/kube/storagev1beta1/volumeattachments/resource.generated.go create mode 100644 pkg/clients/kyverno/interface.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1/client.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1/clusterpolicies/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1/generaterequests/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1/policies/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha1/cleanuppolicies/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha1/client.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha1/clustercleanuppolicies/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha2/admissionreports/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha2/backgroundscanreports/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha2/client.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha2/clusteradmissionreports/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1alpha2/clusterbackgroundscanreports/resource.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1beta1/client.generated.go create mode 100644 pkg/clients/kyverno/kyvernov1beta1/updaterequests/resource.generated.go create mode 100644 pkg/clients/kyverno/wgpolicyk8sv1alpha2/client.generated.go create mode 100644 pkg/clients/kyverno/wgpolicyk8sv1alpha2/clusterpolicyreports/resource.generated.go create mode 100644 pkg/clients/kyverno/wgpolicyk8sv1alpha2/policyreports/resource.generated.go create mode 100644 pkg/clients/metadata/client.go create mode 100644 pkg/clients/metadata/interface.generated.go create mode 100644 pkg/clients/metadata/resource/resource.generated.go delete mode 100644 pkg/clients/middleware/metrics/kube/clientset.generated.go delete mode 100644 pkg/clients/middleware/metrics/kyverno/clientset.generated.go delete mode 100644 pkg/clients/middleware/tracing/kube/clientset.generated.go delete mode 100644 pkg/clients/middleware/tracing/kyverno/clientset.generated.go diff --git a/cmd/internal/client.go b/cmd/internal/client.go new file mode 100644 index 0000000000..6caa4fd6ce --- /dev/null +++ b/cmd/internal/client.go @@ -0,0 +1,53 @@ +package internal + +import ( + "github.com/go-logr/logr" + "github.com/kyverno/kyverno/pkg/client/clientset/versioned" + dyn "github.com/kyverno/kyverno/pkg/clients/dynamic" + kube "github.com/kyverno/kyverno/pkg/clients/kube" + kyverno "github.com/kyverno/kyverno/pkg/clients/kyverno" + meta "github.com/kyverno/kyverno/pkg/clients/metadata" + "github.com/kyverno/kyverno/pkg/config" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/metadata" + "k8s.io/client-go/rest" +) + +func CreateClientConfig(logger logr.Logger) *rest.Config { + clientConfig, err := config.CreateClientConfig(kubeconfig, clientRateLimitQPS, clientRateLimitBurst) + checkError(logger, err, "failed to create rest client configuration") + return clientConfig +} + +func CreateKubernetesClient(logger logr.Logger, opts ...kube.NewOption) kubernetes.Interface { + logger = logger.WithName("kube-client") + logger.Info("create kube client...", "kubeconfig", kubeconfig, "qps", clientRateLimitQPS, "burst", clientRateLimitBurst) + client, err := kube.NewForConfig(CreateClientConfig(logger), opts...) + checkError(logger, err, "failed to create kubernetes client") + return client +} + +func CreateKyvernoClient(logger logr.Logger, opts ...kyverno.NewOption) versioned.Interface { + logger = logger.WithName("kyverno-client") + logger.Info("create kyverno client...", "kubeconfig", kubeconfig, "qps", clientRateLimitQPS, "burst", clientRateLimitBurst) + client, err := kyverno.NewForConfig(CreateClientConfig(logger), opts...) + checkError(logger, err, "failed to create kubernetes client") + return client +} + +func CreateDynamicClient(logger logr.Logger, opts ...dyn.NewOption) dynamic.Interface { + logger = logger.WithName("dynamic-client") + logger.Info("create dynamic client...", "kubeconfig", kubeconfig, "qps", clientRateLimitQPS, "burst", clientRateLimitBurst) + client, err := dyn.NewForConfig(CreateClientConfig(logger), opts...) + checkError(logger, err, "failed to create dynamic client") + return client +} + +func CreateMetadataClient(logger logr.Logger, opts ...meta.NewOption) metadata.Interface { + logger = logger.WithName("metadata-client") + logger.Info("create metadata client...", "kubeconfig", kubeconfig, "qps", clientRateLimitQPS, "burst", clientRateLimitBurst) + client, err := meta.NewForConfig(CreateClientConfig(logger), opts...) + checkError(logger, err, "failed to create metadata client") + return client +} diff --git a/cmd/internal/config.go b/cmd/internal/config.go index 9ad5d553eb..3d46325cea 100644 --- a/cmd/internal/config.go +++ b/cmd/internal/config.go @@ -3,6 +3,7 @@ package internal type Configuration interface { UsesTracing() bool UsesProfiling() bool + UsesKubeconfig() bool } func NewConfiguration(options ...ConfigurationOption) Configuration { @@ -27,9 +28,16 @@ func WithProfiling() ConfigurationOption { } } +func WithKubeconfig() ConfigurationOption { + return func(c *configuration) { + c.usesKubeconfig = true + } +} + type configuration struct { - usesTracing bool - usesProfiling bool + usesTracing bool + usesProfiling bool + usesKubeconfig bool } func (c *configuration) UsesTracing() bool { @@ -39,3 +47,7 @@ func (c *configuration) UsesTracing() bool { func (c *configuration) UsesProfiling() bool { return c.usesProfiling } + +func (c *configuration) UsesKubeconfig() bool { + return c.usesKubeconfig +} diff --git a/cmd/internal/flag.go b/cmd/internal/flag.go index 9540f1ed96..c433c40497 100644 --- a/cmd/internal/flag.go +++ b/cmd/internal/flag.go @@ -18,6 +18,10 @@ var ( tracingAddress string tracingPort string tracingCreds string + // kubeconfig + kubeconfig string + clientRateLimitQPS float64 + clientRateLimitBurst int ) func initLoggingFlags() { @@ -39,6 +43,12 @@ func initTracingFlags() { flag.StringVar(&tracingCreds, "tracingCreds", "", "Set this flag to the CA secret containing the certificate which is used by our Opentelemetry Tracing Client. If empty string is set, means an insecure connection will be used") } +func initKubeconfigFlags() { + flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.") + flag.Float64Var(&clientRateLimitQPS, "clientRateLimitQPS", 20, "Configure the maximum QPS to the Kubernetes API server from Kyverno. Uses the client default if zero.") + flag.IntVar(&clientRateLimitBurst, "clientRateLimitBurst", 50, "Configure the maximum burst for throttle. Uses the client default if zero.") +} + func InitFlags(config Configuration) { // logging initLoggingFlags() @@ -50,4 +60,8 @@ func InitFlags(config Configuration) { if config.UsesTracing() { initTracingFlags() } + // kubeconfig + if config.UsesKubeconfig() { + initKubeconfigFlags() + } } diff --git a/hack/main.go b/hack/main.go index 6f22df783e..03f60dc93e 100644 --- a/hack/main.go +++ b/hack/main.go @@ -11,7 +11,306 @@ import ( "github.com/kyverno/kyverno/pkg/client/clientset/versioned" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" + "k8s.io/client-go/metadata" +) + +const ( + resourceTpl = ` +package resource + +import ( + "fmt" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + {{- range $package := Packages .Target.Type }} + {{ Pkg $package }} {{ Quote $package }} + {{- end }} +) + +func WithMetrics(inner {{ GoType .Target.Type }}, recorder metrics.Recorder) {{ GoType .Target.Type }} { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner {{ GoType .Target.Type }}, client, kind string) {{ GoType .Target.Type }} { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner {{ GoType .Target.Type }} + recorder metrics.Recorder +} + +{{- range $operation := .Target.Operations }} +func (c *withMetrics) {{ $operation.Method.Name }}( + {{- range $i, $arg := Args $operation.Method -}} + {{- if $arg.IsVariadic -}} + arg{{ $i }} ...{{ GoType $arg.Type.Elem }}, + {{- else -}} + arg{{ $i }} {{ GoType $arg.Type }}, + {{- end -}} + {{- end -}} +) ( + {{- range $return := Returns $operation.Method -}} + {{ GoType $return }}, + {{- end -}} +) { + defer c.recorder.Record({{ Quote (SnakeCase $operation.Method.Name) }}) + return c.inner.{{ $operation.Method.Name }}( + {{- range $i, $arg := Args $operation.Method -}} + {{- if $arg.IsVariadic -}} + arg{{ $i }}..., + {{- else -}} + arg{{ $i }}, + {{- end -}} + {{- end -}} + ) +} +{{- end }} + +type withTracing struct { + inner {{ GoType .Target.Type }} + client string + kind string +} + +{{- range $operation := .Target.Operations }} +func (c *withTracing) {{ $operation.Method.Name }}( + {{- range $i, $arg := Args $operation.Method -}} + {{- if $arg.IsVariadic -}} + arg{{ $i }} ...{{ GoType $arg.Type.Elem }}, + {{- else -}} + arg{{ $i }} {{ GoType $arg.Type }}, + {{- end -}} + {{- end -}} +) ( + {{- range $return := Returns $operation.Method -}} + {{ GoType $return }}, + {{- end -}} +) { + {{- if $operation.HasContext }} + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, {{ Quote $operation.Method.Name }}), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", {{ Quote $operation.Method.Name }}), + ) + defer span.End() + arg0 = ctx + {{- end }} + {{ range $i, $ret := Returns $operation.Method }}ret{{ $i }}{{ if not $ret.IsLast -}},{{- end }} {{ end }} := c.inner.{{ $operation.Method.Name }}( + {{- range $i, $arg := Args $operation.Method -}} + {{- if $arg.IsVariadic -}} + arg{{ $i }}..., + {{- else -}} + arg{{ $i }}, + {{- end -}} + {{- end -}} + ) + {{- if $operation.HasContext }} + {{- range $i, $ret := Returns $operation.Method }} + {{- if $ret.IsError }} + if ret{{ $i }} != nil { + span.RecordError(ret{{ $i }}) + span.SetStatus(codes.Error, ret{{ $i }}.Error()) + } + {{- end }} + {{- end }} + {{- end }} + return {{ range $i, $ret := Returns $operation.Method -}} + ret{{ $i }}{{ if not $ret.IsLast -}},{{- end }} + {{- end }} +} +{{- end }} +` + clientTpl = ` +package client + +import ( + "k8s.io/client-go/rest" + "github.com/kyverno/kyverno/pkg/metrics" + {{- range $package := Packages .Target.Type }} + {{ Pkg $package }} {{ Quote $package }} + {{- end }} + {{- range $method, $resource := .Target.Resources }} + {{ ToLower $method.Name }} "github.com/kyverno/kyverno/{{ $.Folder }}/{{ ToLower $method.Name }}" + {{- end }} +) + +func WithMetrics(inner {{ GoType .Target.Type }}, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) {{ GoType .Target.Type }} { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner {{ GoType .Target.Type }}, client string) {{ GoType .Target.Type }} { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner {{ GoType .Target }} + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +{{- range $method, $resource := .Target.Resources }} +func (c *withMetrics) {{ $method.Name }}({{- if $method.IsNamespaced -}}namespace string{{- end -}}) {{ GoType $resource.Type }} { + {{- if $method.IsNamespaced }} + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, {{ Quote $resource.Kind }}, c.clientType) + {{- else }} + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, {{ Quote $resource.Kind }}, c.clientType) + {{- end }} + return {{ ToLower $method.Name }}.WithMetrics(c.inner.{{ $method.Name }}( + {{- if $method.IsNamespaced -}}namespace{{- end -}} + ), recorder) +} +{{- end }} + +type withTracing struct { + inner {{ GoType .Target }} + client string +} +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +{{- range $method, $resource := .Target.Resources }} +func (c *withTracing) {{ $method.Name }}({{- if $method.IsNamespaced -}}namespace string{{- end -}}) {{ GoType $resource.Type }} { + return {{ ToLower $method.Name }}.WithTracing(c.inner.{{ $method.Name }}( + {{- if $method.IsNamespaced -}}namespace{{- end -}}), c.client, {{ Quote $resource.Kind -}} + ) +} +{{- end }} +` + clientsetTpl = ` +package clientset + +import ( + "github.com/kyverno/kyverno/pkg/metrics" + {{- range $package := Packages .Target.Type }} + {{ Pkg $package }} {{ Quote $package }} + {{- end }} + {{- range $clientMethod, $client := .Target.Clients }} + {{ ToLower $clientMethod.Name }} "github.com/kyverno/kyverno/{{ $.Folder }}/{{ ToLower $clientMethod.Name }}" + {{- end }} +) + +type clientset struct { + inner {{ GoType .Target }} + {{- range $clientMethod, $client := .Target.Clients }} + {{ ToLower $clientMethod.Name }} {{ GoType $client.Type }} + {{- end }} +} + +func (c *clientset) Discovery() discovery.DiscoveryInterface { + return c.inner.Discovery() +} + +{{- range $clientMethod, $client := .Target.Clients }} +func (c *clientset) {{ $clientMethod.Name }}() {{ GoType $client.Type }}{ + return c.{{ ToLower $clientMethod.Name }} +} +{{- end }} + +func WrapWithMetrics(inner {{ GoType .Target }}, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) {{ GoType .Target }} { + return &clientset{ + inner: inner, + {{- range $clientMethod, $client := .Target.Clients }} + {{ ToLower $clientMethod.Name }}: {{ ToLower $clientMethod.Name }}.WithMetrics(inner.{{ $clientMethod.Name }}(), metrics, clientType), + {{- end }} + } +} + +func WrapWithTracing(inner {{ GoType .Target }}) {{ GoType .Target }} { + return &clientset{ + inner: inner, + {{- range $clientMethod, $client := .Target.Clients }} + {{ ToLower $clientMethod.Name }}: {{ ToLower $clientMethod.Name }}.WithTracing(inner.{{ $clientMethod.Name }}(), {{ Quote $clientMethod.Name }}), + {{- end }} + } +} +` + interfaceTpl = ` +package clientset + +import ( + "github.com/kyverno/kyverno/pkg/metrics" + {{- range $package := Packages .Target.Type }} + {{ Pkg $package }} {{ Quote $package }} + {{- end }} + {{- range $clientMethod, $client := .Target.Clients }} + {{ ToLower $clientMethod.Name }} "github.com/kyverno/kyverno/{{ $.Folder }}/{{ ToLower $clientMethod.Name }}" + {{- end }} +) + +type Interface interface { + {{ GoType .Target.Type }} + WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface + WithTracing() Interface +} + +type wrapper struct { + {{ GoType .Target.Type }} +} + +type NewOption func (Interface) Interface + +func NewForConfig(c *rest.Config, opts ...NewOption) (Interface, error) { + inner, err := {{ Pkg .Target.Type.PkgPath }}.NewForConfig(c) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client, opts ...NewOption) (Interface, error) { + inner, err := {{ Pkg .Target.Type.PkgPath }}.NewForConfigAndClient(c, httpClient) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigOrDie(c *rest.Config, opts ...NewOption) Interface { + return From({{ Pkg .Target.Type.PkgPath }}.NewForConfigOrDie(c), opts...) +} + +func from(inner {{ GoType .Target }}, opts ...NewOption) Interface { + return &wrapper{inner} +} + +func From(inner {{ GoType .Target }}, opts ...NewOption) Interface { + i := from(inner) + for _, opt := range opts { + i = opt(i) + } + return i +} + +func (i *wrapper) WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface { + return from(WrapWithMetrics(i, m, t)) +} + +func WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) NewOption { + return func(i Interface) Interface { + return i.WithMetrics(m, t) + } +} + +func (i *wrapper) WithTracing() Interface { + return from(WrapWithTracing(i)) +} + +func WithTracing() NewOption { + return func(i Interface) Interface { + return i.WithTracing() + } +} +` ) var ( @@ -50,28 +349,28 @@ func (o operation) HasError() bool { } type resource struct { - Method reflect.Method - Type reflect.Type + reflect.Type Operations []operation } -func (r resource) IsNamespaced() bool { - return r.Method.Type.NumIn() == 1 -} - func (r resource) Kind() string { return strings.ReplaceAll(r.Type.Name(), "Interface", "") } +type resourceKey reflect.Method + +func (r resourceKey) IsNamespaced() bool { + return r.Type.NumIn() == 1 +} + type client struct { - Method reflect.Method - Type reflect.Type - Resources []resource + reflect.Type + Resources map[resourceKey]resource } type clientset struct { - Type reflect.Type - Clients []client + reflect.Type + Clients map[reflect.Method]client } func getIns(in reflect.Method) []reflect.Type { @@ -133,84 +432,82 @@ func toSnakeCase(str string) string { return strings.ToLower(snake) } +func parseResource(in reflect.Type) resource { + r := resource{ + Type: in, + } + for _, operationMethod := range getMethods(in) { + o := operation{ + Method: operationMethod, + } + r.Operations = append(r.Operations, o) + } + return r +} + +func parseClient(in reflect.Type) client { + c := client{ + Type: in, + Resources: map[resourceKey]resource{}, + } + for _, resourceMethod := range getMethods(in) { + // resource methods return only the resosurce interface type + if resourceMethod.Type.NumOut() == 1 && resourceMethod.Name != "RESTClient" { + resourceType := resourceMethod.Type.Out(0) + r := resource{ + Type: resourceType, + } + for _, operationMethod := range getMethods(resourceType) { + o := operation{ + Method: operationMethod, + } + r.Operations = append(r.Operations, o) + } + c.Resources[resourceKey(resourceMethod)] = r + } + } + return c +} + func parse(in reflect.Type) clientset { cs := clientset{ - Type: in, + Type: in, + Clients: map[reflect.Method]client{}, } for _, clientMethod := range getMethods(in) { // client methods return only the client interface type if clientMethod.Type.NumOut() == 1 && clientMethod.Name != "Discovery" { - clientType := clientMethod.Type.Out(0) - c := client{ - Method: clientMethod, - Type: clientType, - } - for _, resourceMethod := range getMethods(clientType) { - // resource methods return only the resosurce interface type - if resourceMethod.Type.NumOut() == 1 && resourceMethod.Name != "RESTClient" { - resourceType := resourceMethod.Type.Out(0) - r := resource{ - Method: resourceMethod, - Type: resourceType, - } - for _, operationMethod := range getMethods(resourceType) { - o := operation{ - Method: operationMethod, - } - r.Operations = append(r.Operations, o) - } - c.Resources = append(c.Resources, r) - } - } - cs.Clients = append(cs.Clients, c) + cs.Clients[clientMethod] = parseClient(clientMethod.Type.Out(0)) } } return cs } -func parseImports(client string, cs clientset, packages ...string) []string { - imports := sets.NewString( - "context", - "net/http", - "github.com/kyverno/kyverno/pkg/metrics", - "github.com/kyverno/kyverno/pkg/clients/middleware/metrics/"+client, - "github.com/kyverno/kyverno/pkg/clients/middleware/tracing/"+client, - "k8s.io/client-go/discovery", - "k8s.io/client-go/rest", - "github.com/kyverno/kyverno/pkg/tracing", - "go.opentelemetry.io/otel/attribute", - "go.opentelemetry.io/otel/codes", - cs.Type.PkgPath(), - ) - for _, c := range cs.Clients { - imports.Insert(c.Type.PkgPath()) - for _, r := range c.Resources { - imports.Insert(r.Type.PkgPath()) - for _, o := range r.Operations { - for _, i := range getIns(o.Method) { - if i.Kind() == reflect.Pointer { - i = i.Elem() - } - if i.PkgPath() != "" { - imports.Insert(i.PkgPath()) - } - } - for _, i := range getOuts(o.Method) { - pkg := i.PkgPath() - if i.Kind() == reflect.Pointer { - i.Elem().PkgPath() - } - if pkg != "" { - imports.Insert(i.PkgPath()) - } - } +func parseImports(in reflect.Type) []string { + imports := sets.NewString(in.PkgPath()) + for _, m := range getMethods(in) { + for _, i := range getIns(m) { + if i.Kind() == reflect.Pointer { + i = i.Elem() + } + if i.PkgPath() != "" { + imports.Insert(i.PkgPath()) + } + } + for _, i := range getOuts(m) { + pkg := i.PkgPath() + if i.Kind() == reflect.Pointer { + i.Elem().PkgPath() + } + if pkg != "" { + imports.Insert(i.PkgPath()) } } } return imports.List() } -func executeTemplate(client string, tpl string, cs clientset, folder string, packages ...string) { +func executeTemplate(tpl string, data interface{}, folder string, file string) { tmpl := template.New("xxx") tmpl.Funcs( template.FuncMap{ @@ -242,367 +539,65 @@ func executeTemplate(client string, tpl string, cs clientset, folder string, pac "GoType": func(in reflect.Type) string { return goType(in) }, + "Packages": func(in reflect.Type) []string { + return parseImports(in) + }, }, ) if tmpl, err := tmpl.Parse(tpl); err != nil { panic(err) } else { - folder := path.Join(folder, client) if err := os.MkdirAll(folder, 0o755); err != nil { panic(fmt.Sprintf("Failed to create directories for %s", folder)) } - file := "clientset.generated.go" f, err := os.Create(path.Join(folder, file)) if err != nil { panic(fmt.Sprintf("Failed to create file %s", path.Join(folder, file))) } if err := tmpl.Execute(f, map[string]interface{}{ - "Folder": folder, - "Client": client, - "Clientset": cs, - "Packages": parseImports(client, cs, packages...), + "Folder": folder, + "Target": data, }); err != nil { panic(err) } } } -func generateInterface(client string, cs clientset, folder string, packages ...string) { - tpl := ` -package client -{{- $clientsetPkg := Pkg .Clientset.Type.PkgPath }} -{{- $metricsPkg := Pkg "github.com/kyverno/kyverno/pkg/metrics" }} -{{- $restPkg := Pkg "k8s.io/client-go/rest" }} -{{- $middlewareMetricsPkg := print "github.com/kyverno/kyverno/pkg/clients/middleware/metrics/" .Client }} -{{- $middlewareTracingPkg := print "github.com/kyverno/kyverno/pkg/clients/middleware/tracing/" .Client }} - -import ( - {{- range $package := .Packages }} - {{ Pkg $package }} {{ Quote $package }} - {{- end }} -) - -type Interface interface { - {{ GoType .Clientset.Type }} - WithMetrics(m {{ $metricsPkg }}.MetricsConfigManager, t {{ $metricsPkg }}.ClientType) Interface - WithTracing() Interface +func generateResource(r resource, folder string) { + executeTemplate(resourceTpl, r, folder, "resource.generated.go") } -type wrapper struct { - {{ GoType .Clientset.Type }} -} - -type NewOption func (Interface) Interface - -func NewForConfig(c *{{ $restPkg }}.Config, opts ...NewOption) (Interface, error) { - inner, err := {{ $clientsetPkg }}.NewForConfig(c) - if err != nil { - return nil, err - } - return From(inner, opts...), nil -} - -func NewForConfigAndClient(c *{{ $restPkg }}.Config, httpClient *{{ Pkg "net/http" }}.Client, opts ...NewOption) (Interface, error) { - inner, err := {{ $clientsetPkg }}.NewForConfigAndClient(c, httpClient) - if err != nil { - return nil, err - } - return From(inner, opts...), nil -} - -func NewForConfigOrDie(c *{{ $restPkg }}.Config, opts ...NewOption) Interface { - return From({{ $clientsetPkg }}.NewForConfigOrDie(c), opts...) -} - -func New(c {{ $restPkg }}.Interface, opts ...NewOption) Interface { - return From({{ $clientsetPkg }}.New(c), opts...) -} - -func from(inner {{ GoType .Clientset.Type }}, opts ...NewOption) Interface { - return &wrapper{inner} -} - -func From(inner {{ GoType .Clientset.Type }}, opts ...NewOption) Interface { - i := from(inner) - for _, opt := range opts { - i = opt(i) - } - return i -} - -func (i *wrapper) WithMetrics(m {{ $metricsPkg }}.MetricsConfigManager, t {{ $metricsPkg }}.ClientType) Interface { - return from({{ Pkg $middlewareMetricsPkg }}.Wrap(i, m, t)) -} - -func WithMetrics(m {{ $metricsPkg }}.MetricsConfigManager, t {{ $metricsPkg }}.ClientType) NewOption { - return func(i Interface) Interface { - return i.WithMetrics(m, t) +func generateClient(c client, folder string) { + executeTemplate(clientTpl, c, folder, "client.generated.go") + for m, r := range c.Resources { + generateResource(r, path.Join(folder, strings.ToLower(m.Name))) } } -func (i *wrapper) WithTracing() Interface { - return from({{ Pkg $middlewareTracingPkg }}.Wrap(i)) -} - -func WithTracing() NewOption { - return func(i Interface) Interface { - return i.WithTracing() - } -} -` - executeTemplate(client, tpl, cs, folder, packages...) -} - -func generateMetricsWrapper(client string, cs clientset, folder string, packages ...string) { - tpl := ` -package client -{{- $clientsetPkg := Pkg .Clientset.Type.PkgPath }} -{{- $metricsPkg := Pkg "github.com/kyverno/kyverno/pkg/metrics" }} -{{- $discoveryPkg := Pkg "k8s.io/client-go/discovery" }} -{{- $restPkg := Pkg "k8s.io/client-go/rest" }} - -import ( - {{- range $package := .Packages }} - {{ Pkg $package }} {{ Quote $package }} - {{- end }} -) - -// Wrap -func Wrap(inner {{ GoType .Clientset.Type }}, m {{ $metricsPkg }}.MetricsConfigManager, t {{ $metricsPkg }}.ClientType) {{ GoType .Clientset.Type }} { - return &clientset{ - inner: inner, - {{- range $client := .Clientset.Clients }} - {{ ToLower $client.Method.Name }}: new{{ $client.Method.Name }}(inner.{{ $client.Method.Name }}(), m, t), - {{- end }} +func generateClientset(cs clientset, folder string) { + executeTemplate(clientsetTpl, cs, folder, "clientset.generated.go") + for m, c := range cs.Clients { + generateClient(c, path.Join(folder, strings.ToLower(m.Name))) } } -// clientset wrapper -type clientset struct { - inner {{ GoType .Clientset.Type }} - {{- range $client := .Clientset.Clients }} - {{ ToLower $client.Method.Name }} {{ GoType $client.Type }} - {{- end }} -} -// Discovery is NOT instrumented -func (c *clientset) Discovery() {{ $discoveryPkg }}.DiscoveryInterface { - return c.inner.Discovery() -} -{{- range $client := .Clientset.Clients }} -func (c *clientset) {{ $client.Method.Name }}() {{ GoType $client.Type }} { - return c.{{ ToLower $client.Method.Name }} -} -{{- end }} - -{{- range $client := .Clientset.Clients }} -{{- $clientGoType := GoType $client.Type }} -// wrapped{{ $client.Method.Name }} wrapper -type wrapped{{ $client.Method.Name }} struct { - inner {{ $clientGoType }} - metrics {{ $metricsPkg }}.MetricsConfigManager - clientType {{ $metricsPkg }}.ClientType -} -func new{{ $client.Method.Name }}(inner {{ $clientGoType }}, metrics {{ $metricsPkg }}.MetricsConfigManager, t {{ $metricsPkg }}.ClientType) {{ $clientGoType }} { - return &wrapped{{ $client.Method.Name }}{inner, metrics, t} -} -{{- range $resource := $client.Resources }} -func (c *wrapped{{ $client.Method.Name }}) {{ $resource.Method.Name }}({{- if $resource.IsNamespaced -}}namespace string{{- end -}}) {{ GoType $resource.Type }} { - {{- if $resource.IsNamespaced }} - recorder := {{ $metricsPkg }}.NamespacedClientQueryRecorder(c.metrics, namespace, {{ Quote $resource.Kind }}, c.clientType) - return new{{ $client.Method.Name }}{{ $resource.Method.Name }}(c.inner.{{ $resource.Method.Name }}(namespace), recorder) - {{- else }} - recorder := {{ $metricsPkg }}.ClusteredClientQueryRecorder(c.metrics, {{ Quote $resource.Kind }}, c.clientType) - return new{{ $client.Method.Name }}{{ $resource.Method.Name }}(c.inner.{{ $resource.Method.Name }}(), recorder) - {{- end }} -} -{{- end }} -// RESTClient is NOT instrumented -func (c *wrapped{{ $client.Method.Name }}) RESTClient() {{ $restPkg }}.Interface { - return c.inner.RESTClient() -} -{{- end }} - -{{- range $client := .Clientset.Clients }} -{{- range $resource := $client.Resources }} -// wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }} wrapper -type wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }} struct { - inner {{ GoType $resource.Type }} - recorder {{ $metricsPkg }}.Recorder -} -func new{{ $client.Method.Name }}{{ $resource.Method.Name }}(inner {{ GoType $resource.Type }}, recorder {{ $metricsPkg }}.Recorder) {{ GoType $resource.Type }} { - return &wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }}{inner, recorder} -} -{{- range $operation := $resource.Operations }} -func (c *wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }}) {{ $operation.Method.Name }}( - {{- range $i, $arg := Args $operation.Method -}} - {{- if $arg.IsVariadic -}} - arg{{ $i }} ...{{ GoType $arg.Type.Elem }}, - {{- else -}} - arg{{ $i }} {{ GoType $arg.Type }}, - {{- end -}} - {{- end -}} -) ( - {{- range $return := Returns $operation.Method -}} - {{ GoType $return }}, - {{- end -}} -) { - defer c.recorder.Record({{ Quote (SnakeCase $operation.Method.Name) }}) - return c.inner.{{ $operation.Method.Name }}( - {{- range $i, $arg := Args $operation.Method -}} - {{- if $arg.IsVariadic -}} - arg{{ $i }}..., - {{- else -}} - arg{{ $i }}, - {{- end -}} - {{- end -}} - ) -} -{{- end }} -{{- end }} -{{- end }} -` - executeTemplate(client, tpl, cs, folder, packages...) -} - -func generateTracesWrapper(client string, cs clientset, folder string, packages ...string) { - tpl := ` -package client -{{- $clientsetPkg := Pkg .Clientset.Type.PkgPath }} -{{- $discoveryPkg := Pkg "k8s.io/client-go/discovery" }} -{{- $restPkg := Pkg "k8s.io/client-go/rest" }} -{{- $tracingPkg := Pkg "github.com/kyverno/kyverno/pkg/tracing" }} -{{- $attributePkg := Pkg "go.opentelemetry.io/otel/attribute" }} -{{- $codesPkg := Pkg "go.opentelemetry.io/otel/codes" }} - -import ( - {{- range $package := .Packages }} - {{ Pkg $package }} {{ Quote $package }} - {{- end }} -) - -// Wrap -func Wrap(inner {{ GoType .Clientset.Type }}) {{ GoType .Clientset.Type }} { - return &clientset{ - inner: inner, - {{- range $client := .Clientset.Clients }} - {{ ToLower $client.Method.Name }}: new{{ $client.Method.Name }}(inner.{{ $client.Method.Name }}()), - {{- end }} - } -} - -// clientset wrapper -type clientset struct { - inner {{ GoType .Clientset.Type }} - {{- range $client := .Clientset.Clients }} - {{ ToLower $client.Method.Name }} {{ GoType $client.Type }} - {{- end }} -} -// Discovery is NOT instrumented -func (c *clientset) Discovery() {{ $discoveryPkg }}.DiscoveryInterface { - return c.inner.Discovery() -} -{{- range $client := .Clientset.Clients }} -func (c *clientset) {{ $client.Method.Name }}() {{ GoType $client.Type }} { - return c.{{ ToLower $client.Method.Name }} -} -{{- end }} - -{{- range $client := .Clientset.Clients }} -{{- $clientGoType := GoType $client.Type }} -// wrapped{{ $client.Method.Name }} wrapper -type wrapped{{ $client.Method.Name }} struct { - inner {{ $clientGoType }} -} -func new{{ $client.Method.Name }}(inner {{ $clientGoType }}) {{ $clientGoType }} { - return &wrapped{{ $client.Method.Name }}{inner} -} -{{- range $resource := $client.Resources }} -func (c *wrapped{{ $client.Method.Name }}) {{ $resource.Method.Name }}({{- if $resource.IsNamespaced -}}namespace string{{- end -}}) {{ GoType $resource.Type }} { - {{- if $resource.IsNamespaced }} - return new{{ $client.Method.Name }}{{ $resource.Method.Name }}(c.inner.{{ $resource.Method.Name }}(namespace)) - {{- else }} - return new{{ $client.Method.Name }}{{ $resource.Method.Name }}(c.inner.{{ $resource.Method.Name }}()) - {{- end }} -} -{{- end }} -// RESTClient is NOT instrumented -func (c *wrapped{{ $client.Method.Name }}) RESTClient() {{ $restPkg }}.Interface { - return c.inner.RESTClient() -} -{{- end }} - -{{- range $client := .Clientset.Clients }} -{{- range $resource := $client.Resources }} -// wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }} wrapper -type wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }} struct { - inner {{ GoType $resource.Type }} -} -func new{{ $client.Method.Name }}{{ $resource.Method.Name }}(inner {{ GoType $resource.Type }}) {{ GoType $resource.Type }} { - return &wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }}{inner} -} -{{- range $operation := $resource.Operations }} -func (c *wrapped{{ $client.Method.Name }}{{ $resource.Method.Name }}) {{ $operation.Method.Name }}( - {{- range $i, $arg := Args $operation.Method -}} - {{- if $arg.IsVariadic -}} - arg{{ $i }} ...{{ GoType $arg.Type.Elem }}, - {{- else -}} - arg{{ $i }} {{ GoType $arg.Type }}, - {{- end -}} - {{- end -}} -) ( - {{- range $return := Returns $operation.Method -}} - {{ GoType $return }}, - {{- end -}} -) { - {{- if $operation.HasContext }} - ctx, span := {{ $tracingPkg }}.StartSpan( - arg0, - {{ Quote $.Folder }}, - "KUBE {{ $client.Method.Name }}/{{ $resource.Method.Name }}/{{ $operation.Method.Name }}", - {{ $attributePkg }}.String("client", {{ Quote $client.Method.Name }}), - {{ $attributePkg }}.String("resource", {{ Quote $resource.Method.Name }}), - {{ $attributePkg }}.String("kind", {{ Quote $resource.Kind }}), - ) - defer span.End() - arg0 = ctx - {{- end }} - {{ range $i, $ret := Returns $operation.Method }}ret{{ $i }}{{ if not $ret.IsLast -}},{{- end }} {{ end }} := c.inner.{{ $operation.Method.Name }}( - {{- range $i, $arg := Args $operation.Method -}} - {{- if $arg.IsVariadic -}} - arg{{ $i }}..., - {{- else -}} - arg{{ $i }}, - {{- end -}} - {{- end -}} - ) - {{- if $operation.HasContext }} - {{- range $i, $ret := Returns $operation.Method }} - {{- if $ret.IsError }} - if ret{{ $i }} != nil { - span.RecordError(ret{{ $i }}) - span.SetStatus({{ $codesPkg }}.Ok, ret{{ $i }}.Error()) - } - {{- end }} - {{- end }} - {{- end }} - return {{ range $i, $ret := Returns $operation.Method -}} - ret{{ $i }}{{ if not $ret.IsLast -}},{{- end }} - {{- end }} -} -{{- end }} -{{- end }} -{{- end }} -` - executeTemplate(client, tpl, cs, folder, packages...) +func generateInterface(cs clientset, folder string) { + executeTemplate(interfaceTpl, cs, folder, "interface.generated.go") } func main() { kube := parse(reflect.TypeOf((*kubernetes.Interface)(nil)).Elem()) + generateClientset(kube, "pkg/clients/kube") + generateInterface(kube, "pkg/clients/kube") kyverno := parse(reflect.TypeOf((*versioned.Interface)(nil)).Elem()) - generateInterface("kube", kube, "pkg/clients") - generateInterface("kyverno", kyverno, "pkg/clients") - generateMetricsWrapper("kube", kube, "pkg/clients/middleware/metrics") - generateMetricsWrapper("kyverno", kyverno, "pkg/clients/middleware/metrics") - generateTracesWrapper("kube", kube, "pkg/clients/middleware/tracing") - generateTracesWrapper("kyverno", kyverno, "pkg/clients/middleware/tracing") + generateClientset(kyverno, "pkg/clients/kyverno") + generateInterface(kyverno, "pkg/clients/kyverno") + dynamicInterface := parse(reflect.TypeOf((*dynamic.Interface)(nil)).Elem()) + dynamicResource := parseResource(reflect.TypeOf((*dynamic.ResourceInterface)(nil)).Elem()) + generateResource(dynamicResource, "pkg/clients/dynamic/resource") + generateInterface(dynamicInterface, "pkg/clients/dynamic") + metadataInterface := parse(reflect.TypeOf((*metadata.Interface)(nil)).Elem()) + metadataResource := parseResource(reflect.TypeOf((*metadata.ResourceInterface)(nil)).Elem()) + generateInterface(metadataInterface, "pkg/clients/metadata") + generateResource(metadataResource, "pkg/clients/metadata/resource") } diff --git a/pkg/clients/dclient/client.go b/pkg/clients/dclient/client.go index c45b69af87..06cc63dfc6 100644 --- a/pkg/clients/dclient/client.go +++ b/pkg/clients/dclient/client.go @@ -56,7 +56,6 @@ type Interface interface { type client struct { client dynamic.Interface discoveryClient IDiscovery - clientConfig *rest.Config kclient kubernetes.Interface metricsConfig metrics.MetricsConfigManager restClient rest.Interface @@ -69,16 +68,13 @@ func NewClient(ctx context.Context, config *rest.Config, kclient kubernetes.Inte return nil, err } client := client{ - client: dclient, - clientConfig: config, - kclient: kclient, - restClient: kclient.Discovery().RESTClient(), + client: dclient, + kclient: kclient, + restClient: kclient.Discovery().RESTClient(), } - if metricsConfig != nil { client.metricsConfig = metricsConfig } - // Set discovery client discoveryClient := &serverPreferredResources{ cachedClient: memory.NewMemCacheClient(kclient.Discovery()), diff --git a/pkg/clients/dynamic/client.go b/pkg/clients/dynamic/client.go new file mode 100644 index 0000000000..323c4fbc56 --- /dev/null +++ b/pkg/clients/dynamic/client.go @@ -0,0 +1,77 @@ +package clientset + +import ( + "github.com/kyverno/kyverno/pkg/clients/dynamic/resource" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" +) + +type namespaceableInterface interface { + Namespace(string) dynamic.ResourceInterface +} + +func WrapWithMetrics(inner dynamic.Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) dynamic.Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WrapWithTracing(inner dynamic.Interface) dynamic.Interface { + return &withTracing{inner} +} + +type withMetrics struct { + inner dynamic.Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +type withMetricsNamespaceable struct { + metrics metrics.MetricsConfigManager + resource string + clientType metrics.ClientType + inner namespaceableInterface +} + +func (c *withMetricsNamespaceable) Namespace(namespace string) dynamic.ResourceInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, c.resource, c.clientType) + return resource.WithMetrics(c.inner.Namespace(namespace), recorder) +} + +func (c *withMetrics) Resource(gvr schema.GroupVersionResource) dynamic.NamespaceableResourceInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, gvr.Resource, c.clientType) + inner := c.inner.Resource(gvr) + return struct { + dynamic.ResourceInterface + namespaceableInterface + }{ + resource.WithMetrics(inner, recorder), + &withMetricsNamespaceable{c.metrics, gvr.Resource, c.clientType, inner}, + } +} + +type withTracing struct { + inner dynamic.Interface +} + +type withTracingNamespaceable struct { + client string + kind string + inner namespaceableInterface +} + +func (c *withTracingNamespaceable) Namespace(namespace string) dynamic.ResourceInterface { + return resource.WithTracing(c.inner.Namespace(namespace), c.client, c.kind) +} + +func (c *withTracing) Resource(gvr schema.GroupVersionResource) dynamic.NamespaceableResourceInterface { + inner := c.inner.Resource(gvr) + client := gvr.GroupResource().String() + kind := gvr.Resource + return struct { + dynamic.ResourceInterface + namespaceableInterface + }{ + resource.WithTracing(inner, client, kind), + &withTracingNamespaceable{client, kind, inner}, + } +} diff --git a/pkg/clients/dynamic/interface.generated.go b/pkg/clients/dynamic/interface.generated.go new file mode 100644 index 0000000000..b026e032d2 --- /dev/null +++ b/pkg/clients/dynamic/interface.generated.go @@ -0,0 +1,73 @@ +package clientset + +import ( + "net/http" + + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_dynamic "k8s.io/client-go/dynamic" + "k8s.io/client-go/rest" +) + +type Interface interface { + k8s_io_client_go_dynamic.Interface + WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface + WithTracing() Interface +} + +type wrapper struct { + k8s_io_client_go_dynamic.Interface +} + +type NewOption func(Interface) Interface + +func NewForConfig(c *rest.Config, opts ...NewOption) (Interface, error) { + inner, err := k8s_io_client_go_dynamic.NewForConfig(c) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client, opts ...NewOption) (Interface, error) { + inner, err := k8s_io_client_go_dynamic.NewForConfigAndClient(c, httpClient) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigOrDie(c *rest.Config, opts ...NewOption) Interface { + return From(k8s_io_client_go_dynamic.NewForConfigOrDie(c), opts...) +} + +func from(inner k8s_io_client_go_dynamic.Interface, opts ...NewOption) Interface { + return &wrapper{inner} +} + +func From(inner k8s_io_client_go_dynamic.Interface, opts ...NewOption) Interface { + i := from(inner) + for _, opt := range opts { + i = opt(i) + } + return i +} + +func (i *wrapper) WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface { + return from(WrapWithMetrics(i, m, t)) +} + +func WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) NewOption { + return func(i Interface) Interface { + return i.WithMetrics(m, t) + } +} + +func (i *wrapper) WithTracing() Interface { + return from(WrapWithTracing(i)) +} + +func WithTracing() NewOption { + return func(i Interface) Interface { + return i.WithTracing() + } +} diff --git a/pkg/clients/dynamic/resource/resource.generated.go b/pkg/clients/dynamic/resource/resource.generated.go new file mode 100644 index 0000000000..5429a9ea99 --- /dev/null +++ b/pkg/clients/dynamic/resource/resource.generated.go @@ -0,0 +1,279 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_apis_meta_v1_unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_dynamic "k8s.io/client-go/dynamic" +) + +func WithMetrics(inner k8s_io_client_go_dynamic.ResourceInterface, recorder metrics.Recorder) k8s_io_client_go_dynamic.ResourceInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_dynamic.ResourceInterface, client, kind string) k8s_io_client_go_dynamic.ResourceInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_dynamic.ResourceInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 string, arg2 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions, arg4 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2, arg3, arg4...) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 string, arg2 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2, arg3...) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg3 ...string) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2, arg3...) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2, arg3...) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.UnstructuredList, error) { + defer c.recorder.Record("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) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2, arg3...) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_dynamic.ResourceInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 string, arg2 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions, arg4 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2, arg3, arg4...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 string, arg2 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2, arg3...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg3 ...string) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2, arg3...) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2, arg3...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.UnstructuredList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2, arg3...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1_unstructured.Unstructured, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/admissionregistrationv1/client.generated.go b/pkg/clients/kube/admissionregistrationv1/client.generated.go new file mode 100644 index 0000000000..b26f40f7cc --- /dev/null +++ b/pkg/clients/kube/admissionregistrationv1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + mutatingwebhookconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/admissionregistrationv1/mutatingwebhookconfigurations" + validatingwebhookconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/admissionregistrationv1/validatingwebhookconfigurations" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface, client string) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "MutatingWebhookConfiguration", c.clientType) + return mutatingwebhookconfigurations.WithMetrics(c.inner.MutatingWebhookConfigurations(), recorder) +} +func (c *withMetrics) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ValidatingWebhookConfiguration", c.clientType) + return validatingwebhookconfigurations.WithMetrics(c.inner.ValidatingWebhookConfigurations(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { + return mutatingwebhookconfigurations.WithTracing(c.inner.MutatingWebhookConfigurations(), c.client, "MutatingWebhookConfiguration") +} +func (c *withTracing) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { + return validatingwebhookconfigurations.WithTracing(c.inner.ValidatingWebhookConfigurations(), c.client, "ValidatingWebhookConfiguration") +} diff --git a/pkg/clients/kube/admissionregistrationv1/mutatingwebhookconfigurations/resource.generated.go b/pkg/clients/kube/admissionregistrationv1/mutatingwebhookconfigurations/resource.generated.go new file mode 100644 index 0000000000..74e1ad81d3 --- /dev/null +++ b/pkg/clients/kube/admissionregistrationv1/mutatingwebhookconfigurations/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_admissionregistration_v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/admissionregistrationv1/validatingwebhookconfigurations/resource.generated.go b/pkg/clients/kube/admissionregistrationv1/validatingwebhookconfigurations/resource.generated.go new file mode 100644 index 0000000000..615f852380 --- /dev/null +++ b/pkg/clients/kube/admissionregistrationv1/validatingwebhookconfigurations/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_admissionregistration_v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/admissionregistrationv1beta1/client.generated.go b/pkg/clients/kube/admissionregistrationv1beta1/client.generated.go new file mode 100644 index 0000000000..e7a06c39e4 --- /dev/null +++ b/pkg/clients/kube/admissionregistrationv1beta1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + mutatingwebhookconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/admissionregistrationv1beta1/mutatingwebhookconfigurations" + validatingwebhookconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/admissionregistrationv1beta1/validatingwebhookconfigurations" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "MutatingWebhookConfiguration", c.clientType) + return mutatingwebhookconfigurations.WithMetrics(c.inner.MutatingWebhookConfigurations(), recorder) +} +func (c *withMetrics) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ValidatingWebhookConfiguration", c.clientType) + return validatingwebhookconfigurations.WithMetrics(c.inner.ValidatingWebhookConfigurations(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { + return mutatingwebhookconfigurations.WithTracing(c.inner.MutatingWebhookConfigurations(), c.client, "MutatingWebhookConfiguration") +} +func (c *withTracing) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { + return validatingwebhookconfigurations.WithTracing(c.inner.ValidatingWebhookConfigurations(), c.client, "ValidatingWebhookConfiguration") +} diff --git a/pkg/clients/kube/admissionregistrationv1beta1/mutatingwebhookconfigurations/resource.generated.go b/pkg/clients/kube/admissionregistrationv1beta1/mutatingwebhookconfigurations/resource.generated.go new file mode 100644 index 0000000000..44f378142d --- /dev/null +++ b/pkg/clients/kube/admissionregistrationv1beta1/mutatingwebhookconfigurations/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/admissionregistrationv1beta1/validatingwebhookconfigurations/resource.generated.go b/pkg/clients/kube/admissionregistrationv1beta1/validatingwebhookconfigurations/resource.generated.go new file mode 100644 index 0000000000..ff01cd73ee --- /dev/null +++ b/pkg/clients/kube/admissionregistrationv1beta1/validatingwebhookconfigurations/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1/client.generated.go b/pkg/clients/kube/appsv1/client.generated.go new file mode 100644 index 0000000000..ee15707fc8 --- /dev/null +++ b/pkg/clients/kube/appsv1/client.generated.go @@ -0,0 +1,74 @@ +package client + +import ( + controllerrevisions "github.com/kyverno/kyverno/pkg/clients/kube/appsv1/controllerrevisions" + daemonsets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1/daemonsets" + deployments "github.com/kyverno/kyverno/pkg/clients/kube/appsv1/deployments" + replicasets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1/replicasets" + statefulsets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1/statefulsets" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface, client string) k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ControllerRevision", c.clientType) + return controllerrevisions.WithMetrics(c.inner.ControllerRevisions(namespace), recorder) +} +func (c *withMetrics) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "DaemonSet", c.clientType) + return daemonsets.WithMetrics(c.inner.DaemonSets(namespace), recorder) +} +func (c *withMetrics) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) + return deployments.WithMetrics(c.inner.Deployments(namespace), recorder) +} +func (c *withMetrics) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicaSet", c.clientType) + return replicasets.WithMetrics(c.inner.ReplicaSets(namespace), recorder) +} +func (c *withMetrics) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "StatefulSet", c.clientType) + return statefulsets.WithMetrics(c.inner.StatefulSets(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { + return controllerrevisions.WithTracing(c.inner.ControllerRevisions(namespace), c.client, "ControllerRevision") +} +func (c *withTracing) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { + return daemonsets.WithTracing(c.inner.DaemonSets(namespace), c.client, "DaemonSet") +} +func (c *withTracing) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { + return deployments.WithTracing(c.inner.Deployments(namespace), c.client, "Deployment") +} +func (c *withTracing) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { + return replicasets.WithTracing(c.inner.ReplicaSets(namespace), c.client, "ReplicaSet") +} +func (c *withTracing) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { + return statefulsets.WithTracing(c.inner.StatefulSets(namespace), c.client, "StatefulSet") +} diff --git a/pkg/clients/kube/appsv1/controllerrevisions/resource.generated.go b/pkg/clients/kube/appsv1/controllerrevisions/resource.generated.go new file mode 100644 index 0000000000..f20d5a3e1a --- /dev/null +++ b/pkg/clients/kube/appsv1/controllerrevisions/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1 "k8s.io/api/apps/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.ControllerRevision, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ControllerRevisionList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.ControllerRevision, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ControllerRevisionList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1/daemonsets/resource.generated.go b/pkg/clients/kube/appsv1/daemonsets/resource.generated.go new file mode 100644 index 0000000000..9eb45d525f --- /dev/null +++ b/pkg/clients/kube/appsv1/daemonsets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1 "k8s.io/api/apps/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DaemonSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DaemonSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1/deployments/resource.generated.go b/pkg/clients/kube/appsv1/deployments/resource.generated.go new file mode 100644 index 0000000000..d438413756 --- /dev/null +++ b/pkg/clients/kube/appsv1/deployments/resource.generated.go @@ -0,0 +1,348 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1 "k8s.io/api/apps/v1" + k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" + k8s_io_client_go_applyconfigurations_autoscaling_v1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("apply_scale") + return c.inner.ApplyScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DeploymentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DeploymentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1/replicasets/resource.generated.go b/pkg/clients/kube/appsv1/replicasets/resource.generated.go new file mode 100644 index 0000000000..f887eb1105 --- /dev/null +++ b/pkg/clients/kube/appsv1/replicasets/resource.generated.go @@ -0,0 +1,348 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1 "k8s.io/api/apps/v1" + k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" + k8s_io_client_go_applyconfigurations_autoscaling_v1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("apply_scale") + return c.inner.ApplyScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ReplicaSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ReplicaSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1/statefulsets/resource.generated.go b/pkg/clients/kube/appsv1/statefulsets/resource.generated.go new file mode 100644 index 0000000000..fe7b8dee1e --- /dev/null +++ b/pkg/clients/kube/appsv1/statefulsets/resource.generated.go @@ -0,0 +1,348 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1 "k8s.io/api/apps/v1" + k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" + k8s_io_client_go_applyconfigurations_autoscaling_v1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("apply_scale") + return c.inner.ApplyScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.StatefulSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.StatefulSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta1/client.generated.go b/pkg/clients/kube/appsv1beta1/client.generated.go new file mode 100644 index 0000000000..5ab8acc55a --- /dev/null +++ b/pkg/clients/kube/appsv1beta1/client.generated.go @@ -0,0 +1,58 @@ +package client + +import ( + controllerrevisions "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta1/controllerrevisions" + deployments "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta1/deployments" + statefulsets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta1/statefulsets" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ControllerRevision", c.clientType) + return controllerrevisions.WithMetrics(c.inner.ControllerRevisions(namespace), recorder) +} +func (c *withMetrics) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) + return deployments.WithMetrics(c.inner.Deployments(namespace), recorder) +} +func (c *withMetrics) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "StatefulSet", c.clientType) + return statefulsets.WithMetrics(c.inner.StatefulSets(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { + return controllerrevisions.WithTracing(c.inner.ControllerRevisions(namespace), c.client, "ControllerRevision") +} +func (c *withTracing) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { + return deployments.WithTracing(c.inner.Deployments(namespace), c.client, "Deployment") +} +func (c *withTracing) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { + return statefulsets.WithTracing(c.inner.StatefulSets(namespace), c.client, "StatefulSet") +} diff --git a/pkg/clients/kube/appsv1beta1/controllerrevisions/resource.generated.go b/pkg/clients/kube/appsv1beta1/controllerrevisions/resource.generated.go new file mode 100644 index 0000000000..0d6d6cf376 --- /dev/null +++ b/pkg/clients/kube/appsv1beta1/controllerrevisions/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta1 "k8s.io/api/apps/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" + k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.ControllerRevisionList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.ControllerRevisionList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta1/deployments/resource.generated.go b/pkg/clients/kube/appsv1beta1/deployments/resource.generated.go new file mode 100644 index 0000000000..1aafa99d20 --- /dev/null +++ b/pkg/clients/kube/appsv1beta1/deployments/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta1 "k8s.io/api/apps/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" + k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.DeploymentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.DeploymentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta1/statefulsets/resource.generated.go b/pkg/clients/kube/appsv1beta1/statefulsets/resource.generated.go new file mode 100644 index 0000000000..5d018058e6 --- /dev/null +++ b/pkg/clients/kube/appsv1beta1/statefulsets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta1 "k8s.io/api/apps/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" + k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.StatefulSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.StatefulSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta2/client.generated.go b/pkg/clients/kube/appsv1beta2/client.generated.go new file mode 100644 index 0000000000..c39797c7b7 --- /dev/null +++ b/pkg/clients/kube/appsv1beta2/client.generated.go @@ -0,0 +1,74 @@ +package client + +import ( + controllerrevisions "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta2/controllerrevisions" + daemonsets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta2/daemonsets" + deployments "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta2/deployments" + replicasets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta2/replicasets" + statefulsets "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta2/statefulsets" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface, client string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ControllerRevision", c.clientType) + return controllerrevisions.WithMetrics(c.inner.ControllerRevisions(namespace), recorder) +} +func (c *withMetrics) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "DaemonSet", c.clientType) + return daemonsets.WithMetrics(c.inner.DaemonSets(namespace), recorder) +} +func (c *withMetrics) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) + return deployments.WithMetrics(c.inner.Deployments(namespace), recorder) +} +func (c *withMetrics) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicaSet", c.clientType) + return replicasets.WithMetrics(c.inner.ReplicaSets(namespace), recorder) +} +func (c *withMetrics) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "StatefulSet", c.clientType) + return statefulsets.WithMetrics(c.inner.StatefulSets(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { + return controllerrevisions.WithTracing(c.inner.ControllerRevisions(namespace), c.client, "ControllerRevision") +} +func (c *withTracing) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { + return daemonsets.WithTracing(c.inner.DaemonSets(namespace), c.client, "DaemonSet") +} +func (c *withTracing) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { + return deployments.WithTracing(c.inner.Deployments(namespace), c.client, "Deployment") +} +func (c *withTracing) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { + return replicasets.WithTracing(c.inner.ReplicaSets(namespace), c.client, "ReplicaSet") +} +func (c *withTracing) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { + return statefulsets.WithTracing(c.inner.StatefulSets(namespace), c.client, "StatefulSet") +} diff --git a/pkg/clients/kube/appsv1beta2/controllerrevisions/resource.generated.go b/pkg/clients/kube/appsv1beta2/controllerrevisions/resource.generated.go new file mode 100644 index 0000000000..80bbc4f3e3 --- /dev/null +++ b/pkg/clients/kube/appsv1beta2/controllerrevisions/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ControllerRevisionList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ControllerRevisionList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta2/daemonsets/resource.generated.go b/pkg/clients/kube/appsv1beta2/daemonsets/resource.generated.go new file mode 100644 index 0000000000..7fd634900a --- /dev/null +++ b/pkg/clients/kube/appsv1beta2/daemonsets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DaemonSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DaemonSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta2/deployments/resource.generated.go b/pkg/clients/kube/appsv1beta2/deployments/resource.generated.go new file mode 100644 index 0000000000..b2ff99645c --- /dev/null +++ b/pkg/clients/kube/appsv1beta2/deployments/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DeploymentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DeploymentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta2/replicasets/resource.generated.go b/pkg/clients/kube/appsv1beta2/replicasets/resource.generated.go new file mode 100644 index 0000000000..aa16390baf --- /dev/null +++ b/pkg/clients/kube/appsv1beta2/replicasets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ReplicaSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ReplicaSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/appsv1beta2/statefulsets/resource.generated.go b/pkg/clients/kube/appsv1beta2/statefulsets/resource.generated.go new file mode 100644 index 0000000000..fedc30f75b --- /dev/null +++ b/pkg/clients/kube/appsv1beta2/statefulsets/resource.generated.go @@ -0,0 +1,346 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { + defer c.recorder.Record("apply_scale") + return c.inner.ApplyScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.StatefulSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_apps_v1beta2.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.StatefulSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_apps_v1beta2.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authenticationv1/client.generated.go b/pkg/clients/kube/authenticationv1/client.generated.go new file mode 100644 index 0000000000..e20fec5742 --- /dev/null +++ b/pkg/clients/kube/authenticationv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + tokenreviews "github.com/kyverno/kyverno/pkg/clients/kube/authenticationv1/tokenreviews" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_authentication_v1 "k8s.io/client-go/kubernetes/typed/authentication/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface, client string) k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "TokenReview", c.clientType) + return tokenreviews.WithMetrics(c.inner.TokenReviews(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { + return tokenreviews.WithTracing(c.inner.TokenReviews(), c.client, "TokenReview") +} diff --git a/pkg/clients/kube/authenticationv1/tokenreviews/resource.generated.go b/pkg/clients/kube/authenticationv1/tokenreviews/resource.generated.go new file mode 100644 index 0000000000..4cc2cc69d0 --- /dev/null +++ b/pkg/clients/kube/authenticationv1/tokenreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authentication_v1 "k8s.io/api/authentication/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authentication_v1 "k8s.io/client-go/kubernetes/typed/authentication/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authenticationv1beta1/client.generated.go b/pkg/clients/kube/authenticationv1beta1/client.generated.go new file mode 100644 index 0000000000..a293e1d82e --- /dev/null +++ b/pkg/clients/kube/authenticationv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + tokenreviews "github.com/kyverno/kyverno/pkg/clients/kube/authenticationv1beta1/tokenreviews" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_authentication_v1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "TokenReview", c.clientType) + return tokenreviews.WithMetrics(c.inner.TokenReviews(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { + return tokenreviews.WithTracing(c.inner.TokenReviews(), c.client, "TokenReview") +} diff --git a/pkg/clients/kube/authenticationv1beta1/tokenreviews/resource.generated.go b/pkg/clients/kube/authenticationv1beta1/tokenreviews/resource.generated.go new file mode 100644 index 0000000000..10aec0dc5d --- /dev/null +++ b/pkg/clients/kube/authenticationv1beta1/tokenreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authentication_v1beta1 "k8s.io/api/authentication/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authentication_v1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1beta1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1beta1.TokenReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1beta1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1beta1.TokenReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1/client.generated.go b/pkg/clients/kube/authorizationv1/client.generated.go new file mode 100644 index 0000000000..87056b4ff6 --- /dev/null +++ b/pkg/clients/kube/authorizationv1/client.generated.go @@ -0,0 +1,66 @@ +package client + +import ( + localsubjectaccessreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1/localsubjectaccessreviews" + selfsubjectaccessreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1/selfsubjectaccessreviews" + selfsubjectrulesreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1/selfsubjectrulesreviews" + subjectaccessreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1/subjectaccessreviews" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface, client string) k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LocalSubjectAccessReview", c.clientType) + return localsubjectaccessreviews.WithMetrics(c.inner.LocalSubjectAccessReviews(namespace), recorder) +} +func (c *withMetrics) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectAccessReview", c.clientType) + return selfsubjectaccessreviews.WithMetrics(c.inner.SelfSubjectAccessReviews(), recorder) +} +func (c *withMetrics) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectRulesReview", c.clientType) + return selfsubjectrulesreviews.WithMetrics(c.inner.SelfSubjectRulesReviews(), recorder) +} +func (c *withMetrics) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "SubjectAccessReview", c.clientType) + return subjectaccessreviews.WithMetrics(c.inner.SubjectAccessReviews(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { + return localsubjectaccessreviews.WithTracing(c.inner.LocalSubjectAccessReviews(namespace), c.client, "LocalSubjectAccessReview") +} +func (c *withTracing) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { + return selfsubjectaccessreviews.WithTracing(c.inner.SelfSubjectAccessReviews(), c.client, "SelfSubjectAccessReview") +} +func (c *withTracing) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { + return selfsubjectrulesreviews.WithTracing(c.inner.SelfSubjectRulesReviews(), c.client, "SelfSubjectRulesReview") +} +func (c *withTracing) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { + return subjectaccessreviews.WithTracing(c.inner.SubjectAccessReviews(), c.client, "SubjectAccessReview") +} diff --git a/pkg/clients/kube/authorizationv1/localsubjectaccessreviews/resource.generated.go b/pkg/clients/kube/authorizationv1/localsubjectaccessreviews/resource.generated.go new file mode 100644 index 0000000000..d61618431e --- /dev/null +++ b/pkg/clients/kube/authorizationv1/localsubjectaccessreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1 "k8s.io/api/authorization/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.LocalSubjectAccessReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.LocalSubjectAccessReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1/selfsubjectaccessreviews/resource.generated.go b/pkg/clients/kube/authorizationv1/selfsubjectaccessreviews/resource.generated.go new file mode 100644 index 0000000000..203ffd1c06 --- /dev/null +++ b/pkg/clients/kube/authorizationv1/selfsubjectaccessreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1 "k8s.io/api/authorization/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectAccessReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectAccessReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1/selfsubjectrulesreviews/resource.generated.go b/pkg/clients/kube/authorizationv1/selfsubjectrulesreviews/resource.generated.go new file mode 100644 index 0000000000..3942370eaa --- /dev/null +++ b/pkg/clients/kube/authorizationv1/selfsubjectrulesreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1 "k8s.io/api/authorization/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectRulesReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectRulesReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1/subjectaccessreviews/resource.generated.go b/pkg/clients/kube/authorizationv1/subjectaccessreviews/resource.generated.go new file mode 100644 index 0000000000..dfc8c08803 --- /dev/null +++ b/pkg/clients/kube/authorizationv1/subjectaccessreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1 "k8s.io/api/authorization/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SubjectAccessReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SubjectAccessReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1beta1/client.generated.go b/pkg/clients/kube/authorizationv1beta1/client.generated.go new file mode 100644 index 0000000000..c107716c89 --- /dev/null +++ b/pkg/clients/kube/authorizationv1beta1/client.generated.go @@ -0,0 +1,66 @@ +package client + +import ( + localsubjectaccessreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1beta1/localsubjectaccessreviews" + selfsubjectaccessreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1beta1/selfsubjectaccessreviews" + selfsubjectrulesreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1beta1/selfsubjectrulesreviews" + subjectaccessreviews "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1beta1/subjectaccessreviews" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LocalSubjectAccessReview", c.clientType) + return localsubjectaccessreviews.WithMetrics(c.inner.LocalSubjectAccessReviews(namespace), recorder) +} +func (c *withMetrics) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectAccessReview", c.clientType) + return selfsubjectaccessreviews.WithMetrics(c.inner.SelfSubjectAccessReviews(), recorder) +} +func (c *withMetrics) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectRulesReview", c.clientType) + return selfsubjectrulesreviews.WithMetrics(c.inner.SelfSubjectRulesReviews(), recorder) +} +func (c *withMetrics) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "SubjectAccessReview", c.clientType) + return subjectaccessreviews.WithMetrics(c.inner.SubjectAccessReviews(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { + return localsubjectaccessreviews.WithTracing(c.inner.LocalSubjectAccessReviews(namespace), c.client, "LocalSubjectAccessReview") +} +func (c *withTracing) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { + return selfsubjectaccessreviews.WithTracing(c.inner.SelfSubjectAccessReviews(), c.client, "SelfSubjectAccessReview") +} +func (c *withTracing) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { + return selfsubjectrulesreviews.WithTracing(c.inner.SelfSubjectRulesReviews(), c.client, "SelfSubjectRulesReview") +} +func (c *withTracing) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { + return subjectaccessreviews.WithTracing(c.inner.SubjectAccessReviews(), c.client, "SubjectAccessReview") +} diff --git a/pkg/clients/kube/authorizationv1beta1/localsubjectaccessreviews/resource.generated.go b/pkg/clients/kube/authorizationv1beta1/localsubjectaccessreviews/resource.generated.go new file mode 100644 index 0000000000..4a815b3ace --- /dev/null +++ b/pkg/clients/kube/authorizationv1beta1/localsubjectaccessreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1beta1 "k8s.io/api/authorization/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1beta1/selfsubjectaccessreviews/resource.generated.go b/pkg/clients/kube/authorizationv1beta1/selfsubjectaccessreviews/resource.generated.go new file mode 100644 index 0000000000..a0c38ee05a --- /dev/null +++ b/pkg/clients/kube/authorizationv1beta1/selfsubjectaccessreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1beta1 "k8s.io/api/authorization/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1beta1/selfsubjectrulesreviews/resource.generated.go b/pkg/clients/kube/authorizationv1beta1/selfsubjectrulesreviews/resource.generated.go new file mode 100644 index 0000000000..1295ea8165 --- /dev/null +++ b/pkg/clients/kube/authorizationv1beta1/selfsubjectrulesreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1beta1 "k8s.io/api/authorization/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/authorizationv1beta1/subjectaccessreviews/resource.generated.go b/pkg/clients/kube/authorizationv1beta1/subjectaccessreviews/resource.generated.go new file mode 100644 index 0000000000..a2cf97c950 --- /dev/null +++ b/pkg/clients/kube/authorizationv1beta1/subjectaccessreviews/resource.generated.go @@ -0,0 +1,57 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authorization_v1beta1 "k8s.io/api/authorization/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface, client, kind string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SubjectAccessReview, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SubjectAccessReview, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/autoscalingv1/client.generated.go b/pkg/clients/kube/autoscalingv1/client.generated.go new file mode 100644 index 0000000000..c47ab71029 --- /dev/null +++ b/pkg/clients/kube/autoscalingv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + horizontalpodautoscalers "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv1/horizontalpodautoscalers" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_autoscaling_v1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface, client string) k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) + return horizontalpodautoscalers.WithMetrics(c.inner.HorizontalPodAutoscalers(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { + return horizontalpodautoscalers.WithTracing(c.inner.HorizontalPodAutoscalers(namespace), c.client, "HorizontalPodAutoscaler") +} diff --git a/pkg/clients/kube/autoscalingv1/horizontalpodautoscalers/resource.generated.go b/pkg/clients/kube/autoscalingv1/horizontalpodautoscalers/resource.generated.go new file mode 100644 index 0000000000..bddc06541a --- /dev/null +++ b/pkg/clients/kube/autoscalingv1/horizontalpodautoscalers/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_autoscaling_v1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + k8s_io_client_go_kubernetes_typed_autoscaling_v1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface, client, kind string) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscalerList, error) { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscalerList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/autoscalingv2/client.generated.go b/pkg/clients/kube/autoscalingv2/client.generated.go new file mode 100644 index 0000000000..7472ff403d --- /dev/null +++ b/pkg/clients/kube/autoscalingv2/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + horizontalpodautoscalers "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv2/horizontalpodautoscalers" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_autoscaling_v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface, client string) k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) + return horizontalpodautoscalers.WithMetrics(c.inner.HorizontalPodAutoscalers(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { + return horizontalpodautoscalers.WithTracing(c.inner.HorizontalPodAutoscalers(namespace), c.client, "HorizontalPodAutoscaler") +} diff --git a/pkg/clients/kube/autoscalingv2/horizontalpodautoscalers/resource.generated.go b/pkg/clients/kube/autoscalingv2/horizontalpodautoscalers/resource.generated.go new file mode 100644 index 0000000000..5c8411a223 --- /dev/null +++ b/pkg/clients/kube/autoscalingv2/horizontalpodautoscalers/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_autoscaling_v2 "k8s.io/api/autoscaling/v2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_autoscaling_v2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" + k8s_io_client_go_kubernetes_typed_autoscaling_v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface, client, kind string) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscalerList, error) { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscalerList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/autoscalingv2beta1/client.generated.go b/pkg/clients/kube/autoscalingv2beta1/client.generated.go new file mode 100644 index 0000000000..a146c4e04a --- /dev/null +++ b/pkg/clients/kube/autoscalingv2beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + horizontalpodautoscalers "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv2beta1/horizontalpodautoscalers" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface, client string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) + return horizontalpodautoscalers.WithMetrics(c.inner.HorizontalPodAutoscalers(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { + return horizontalpodautoscalers.WithTracing(c.inner.HorizontalPodAutoscalers(namespace), c.client, "HorizontalPodAutoscaler") +} diff --git a/pkg/clients/kube/autoscalingv2beta1/horizontalpodautoscalers/resource.generated.go b/pkg/clients/kube/autoscalingv2beta1/horizontalpodautoscalers/resource.generated.go new file mode 100644 index 0000000000..dbeb59cea1 --- /dev/null +++ b/pkg/clients/kube/autoscalingv2beta1/horizontalpodautoscalers/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_autoscaling_v2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" + k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface, client, kind string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscalerList, error) { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscalerList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/autoscalingv2beta2/client.generated.go b/pkg/clients/kube/autoscalingv2beta2/client.generated.go new file mode 100644 index 0000000000..2d431404ca --- /dev/null +++ b/pkg/clients/kube/autoscalingv2beta2/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + horizontalpodautoscalers "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv2beta2/horizontalpodautoscalers" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface, client string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) + return horizontalpodautoscalers.WithMetrics(c.inner.HorizontalPodAutoscalers(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { + return horizontalpodautoscalers.WithTracing(c.inner.HorizontalPodAutoscalers(namespace), c.client, "HorizontalPodAutoscaler") +} diff --git a/pkg/clients/kube/autoscalingv2beta2/horizontalpodautoscalers/resource.generated.go b/pkg/clients/kube/autoscalingv2beta2/horizontalpodautoscalers/resource.generated.go new file mode 100644 index 0000000000..452808bea0 --- /dev/null +++ b/pkg/clients/kube/autoscalingv2beta2/horizontalpodautoscalers/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_autoscaling_v2beta2 "k8s.io/api/autoscaling/v2beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_autoscaling_v2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" + k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface, client, kind string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscalerList, error) { + defer c.recorder.Record("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) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscalerList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/batchv1/client.generated.go b/pkg/clients/kube/batchv1/client.generated.go new file mode 100644 index 0000000000..61ee655312 --- /dev/null +++ b/pkg/clients/kube/batchv1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + cronjobs "github.com/kyverno/kyverno/pkg/clients/kube/batchv1/cronjobs" + jobs "github.com/kyverno/kyverno/pkg/clients/kube/batchv1/jobs" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_batch_v1 "k8s.io/client-go/kubernetes/typed/batch/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface, client string) k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CronJob", c.clientType) + return cronjobs.WithMetrics(c.inner.CronJobs(namespace), recorder) +} +func (c *withMetrics) Jobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Job", c.clientType) + return jobs.WithMetrics(c.inner.Jobs(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { + return cronjobs.WithTracing(c.inner.CronJobs(namespace), c.client, "CronJob") +} +func (c *withTracing) Jobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { + return jobs.WithTracing(c.inner.Jobs(namespace), c.client, "Job") +} diff --git a/pkg/clients/kube/batchv1/cronjobs/resource.generated.go b/pkg/clients/kube/batchv1/cronjobs/resource.generated.go new file mode 100644 index 0000000000..e23c3f2fd5 --- /dev/null +++ b/pkg/clients/kube/batchv1/cronjobs/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_batch_v1 "k8s.io/api/batch/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_batch_v1 "k8s.io/client-go/applyconfigurations/batch/v1" + k8s_io_client_go_kubernetes_typed_batch_v1 "k8s.io/client-go/kubernetes/typed/batch/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface, client, kind string) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.CronJobList, error) { + defer c.recorder.Record("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) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.CronJobList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/batchv1/jobs/resource.generated.go b/pkg/clients/kube/batchv1/jobs/resource.generated.go new file mode 100644 index 0000000000..4159d253be --- /dev/null +++ b/pkg/clients/kube/batchv1/jobs/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_batch_v1 "k8s.io/api/batch/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_batch_v1 "k8s.io/client-go/applyconfigurations/batch/v1" + k8s_io_client_go_kubernetes_typed_batch_v1 "k8s.io/client-go/kubernetes/typed/batch/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface, client, kind string) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.JobList, error) { + defer c.recorder.Record("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) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.JobList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/batchv1beta1/client.generated.go b/pkg/clients/kube/batchv1beta1/client.generated.go new file mode 100644 index 0000000000..9f3c4657f5 --- /dev/null +++ b/pkg/clients/kube/batchv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + cronjobs "github.com/kyverno/kyverno/pkg/clients/kube/batchv1beta1/cronjobs" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_batch_v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CronJob", c.clientType) + return cronjobs.WithMetrics(c.inner.CronJobs(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { + return cronjobs.WithTracing(c.inner.CronJobs(namespace), c.client, "CronJob") +} diff --git a/pkg/clients/kube/batchv1beta1/cronjobs/resource.generated.go b/pkg/clients/kube/batchv1beta1/cronjobs/resource.generated.go new file mode 100644 index 0000000000..ede03c1fa9 --- /dev/null +++ b/pkg/clients/kube/batchv1beta1/cronjobs/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_batch_v1beta1 "k8s.io/api/batch/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_batch_v1beta1 "k8s.io/client-go/applyconfigurations/batch/v1beta1" + k8s_io_client_go_kubernetes_typed_batch_v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface, client, kind string) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1beta1.CronJobList, error) { + defer c.recorder.Record("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) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1beta1.CronJobList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/certificatesv1/certificatesigningrequests/resource.generated.go b/pkg/clients/kube/certificatesv1/certificatesigningrequests/resource.generated.go new file mode 100644 index 0000000000..8e356b5c28 --- /dev/null +++ b/pkg/clients/kube/certificatesv1/certificatesigningrequests/resource.generated.go @@ -0,0 +1,302 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_certificates_v1 "k8s.io/api/certificates/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_certificates_v1 "k8s.io/client-go/applyconfigurations/certificates/v1" + k8s_io_client_go_kubernetes_typed_certificates_v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface, client, kind string) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequestList, error) { + defer c.recorder.Record("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) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateApproval(arg0 context.Context, arg1 string, arg2 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("update_approval") + return c.inner.UpdateApproval(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequestList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateApproval(arg0 context.Context, arg1 string, arg2 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateApproval"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateApproval"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateApproval(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/certificatesv1/client.generated.go b/pkg/clients/kube/certificatesv1/client.generated.go new file mode 100644 index 0000000000..7e3b5986d1 --- /dev/null +++ b/pkg/clients/kube/certificatesv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + certificatesigningrequests "github.com/kyverno/kyverno/pkg/clients/kube/certificatesv1/certificatesigningrequests" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_certificates_v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface, client string) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "CertificateSigningRequest", c.clientType) + return certificatesigningrequests.WithMetrics(c.inner.CertificateSigningRequests(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { + return certificatesigningrequests.WithTracing(c.inner.CertificateSigningRequests(), c.client, "CertificateSigningRequest") +} diff --git a/pkg/clients/kube/certificatesv1beta1/certificatesigningrequests/resource.generated.go b/pkg/clients/kube/certificatesv1beta1/certificatesigningrequests/resource.generated.go new file mode 100644 index 0000000000..fb7d5a9490 --- /dev/null +++ b/pkg/clients/kube/certificatesv1beta1/certificatesigningrequests/resource.generated.go @@ -0,0 +1,302 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_certificates_v1beta1 "k8s.io/api/certificates/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_certificates_v1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" + k8s_io_client_go_kubernetes_typed_certificates_v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface, client, kind string) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequestList, error) { + defer c.recorder.Record("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) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateApproval(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("update_approval") + return c.inner.UpdateApproval(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequestList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateApproval(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateApproval"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateApproval"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateApproval(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/certificatesv1beta1/client.generated.go b/pkg/clients/kube/certificatesv1beta1/client.generated.go new file mode 100644 index 0000000000..4e676dbb9c --- /dev/null +++ b/pkg/clients/kube/certificatesv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + certificatesigningrequests "github.com/kyverno/kyverno/pkg/clients/kube/certificatesv1beta1/certificatesigningrequests" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_certificates_v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "CertificateSigningRequest", c.clientType) + return certificatesigningrequests.WithMetrics(c.inner.CertificateSigningRequests(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { + return certificatesigningrequests.WithTracing(c.inner.CertificateSigningRequests(), c.client, "CertificateSigningRequest") +} diff --git a/pkg/clients/kube/clientset.generated.go b/pkg/clients/kube/clientset.generated.go index 8e37ce98c4..2eeba218c3 100644 --- a/pkg/clients/kube/clientset.generated.go +++ b/pkg/clients/kube/clientset.generated.go @@ -1,79 +1,395 @@ -package client +package clientset import ( - net_http "net/http" - - github_com_kyverno_kyverno_pkg_clients_middleware_metrics_kube "github.com/kyverno/kyverno/pkg/clients/middleware/metrics/kube" - github_com_kyverno_kyverno_pkg_clients_middleware_tracing_kube "github.com/kyverno/kyverno/pkg/clients/middleware/tracing/kube" - github_com_kyverno_kyverno_pkg_metrics "github.com/kyverno/kyverno/pkg/metrics" + admissionregistrationv1 "github.com/kyverno/kyverno/pkg/clients/kube/admissionregistrationv1" + admissionregistrationv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/admissionregistrationv1beta1" + appsv1 "github.com/kyverno/kyverno/pkg/clients/kube/appsv1" + appsv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta1" + appsv1beta2 "github.com/kyverno/kyverno/pkg/clients/kube/appsv1beta2" + authenticationv1 "github.com/kyverno/kyverno/pkg/clients/kube/authenticationv1" + authenticationv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/authenticationv1beta1" + authorizationv1 "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1" + authorizationv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/authorizationv1beta1" + autoscalingv1 "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv1" + autoscalingv2 "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv2" + autoscalingv2beta1 "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv2beta1" + autoscalingv2beta2 "github.com/kyverno/kyverno/pkg/clients/kube/autoscalingv2beta2" + batchv1 "github.com/kyverno/kyverno/pkg/clients/kube/batchv1" + batchv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/batchv1beta1" + certificatesv1 "github.com/kyverno/kyverno/pkg/clients/kube/certificatesv1" + certificatesv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/certificatesv1beta1" + coordinationv1 "github.com/kyverno/kyverno/pkg/clients/kube/coordinationv1" + coordinationv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/coordinationv1beta1" + corev1 "github.com/kyverno/kyverno/pkg/clients/kube/corev1" + discoveryv1 "github.com/kyverno/kyverno/pkg/clients/kube/discoveryv1" + discoveryv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/discoveryv1beta1" + eventsv1 "github.com/kyverno/kyverno/pkg/clients/kube/eventsv1" + eventsv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/eventsv1beta1" + extensionsv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1" + flowcontrolv1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1alpha1" + flowcontrolv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1beta1" + flowcontrolv1beta2 "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1beta2" + internalv1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/internalv1alpha1" + networkingv1 "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1" + networkingv1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1alpha1" + networkingv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1beta1" + nodev1 "github.com/kyverno/kyverno/pkg/clients/kube/nodev1" + nodev1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/nodev1alpha1" + nodev1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/nodev1beta1" + policyv1 "github.com/kyverno/kyverno/pkg/clients/kube/policyv1" + policyv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/policyv1beta1" + rbacv1 "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1" + rbacv1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1alpha1" + rbacv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1beta1" + schedulingv1 "github.com/kyverno/kyverno/pkg/clients/kube/schedulingv1" + schedulingv1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/schedulingv1alpha1" + schedulingv1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/schedulingv1beta1" + storagev1 "github.com/kyverno/kyverno/pkg/clients/kube/storagev1" + storagev1alpha1 "github.com/kyverno/kyverno/pkg/clients/kube/storagev1alpha1" + storagev1beta1 "github.com/kyverno/kyverno/pkg/clients/kube/storagev1beta1" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/discovery" k8s_io_client_go_kubernetes "k8s.io/client-go/kubernetes" - k8s_io_client_go_rest "k8s.io/client-go/rest" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" + k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" + k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" + k8s_io_client_go_kubernetes_typed_authentication_v1 "k8s.io/client-go/kubernetes/typed/authentication/v1" + k8s_io_client_go_kubernetes_typed_authentication_v1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" + k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" + k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" + k8s_io_client_go_kubernetes_typed_autoscaling_v1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + k8s_io_client_go_kubernetes_typed_autoscaling_v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" + k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" + k8s_io_client_go_kubernetes_typed_batch_v1 "k8s.io/client-go/kubernetes/typed/batch/v1" + k8s_io_client_go_kubernetes_typed_batch_v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" + k8s_io_client_go_kubernetes_typed_certificates_v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" + k8s_io_client_go_kubernetes_typed_certificates_v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + k8s_io_client_go_kubernetes_typed_coordination_v1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + k8s_io_client_go_kubernetes_typed_coordination_v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" + k8s_io_client_go_kubernetes_typed_discovery_v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" + k8s_io_client_go_kubernetes_typed_discovery_v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" + k8s_io_client_go_kubernetes_typed_events_v1 "k8s.io/client-go/kubernetes/typed/events/v1" + k8s_io_client_go_kubernetes_typed_events_v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" + k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" + k8s_io_client_go_kubernetes_typed_networking_v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + k8s_io_client_go_kubernetes_typed_networking_v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + k8s_io_client_go_kubernetes_typed_node_v1 "k8s.io/client-go/kubernetes/typed/node/v1" + k8s_io_client_go_kubernetes_typed_node_v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" + k8s_io_client_go_kubernetes_typed_node_v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" + k8s_io_client_go_kubernetes_typed_policy_v1 "k8s.io/client-go/kubernetes/typed/policy/v1" + k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" + k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" + k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + k8s_io_client_go_kubernetes_typed_scheduling_v1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" + k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + k8s_io_client_go_kubernetes_typed_scheduling_v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" + k8s_io_client_go_kubernetes_typed_storage_v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" ) -type Interface interface { - k8s_io_client_go_kubernetes.Interface - WithMetrics(m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) Interface - WithTracing() Interface +type clientset struct { + inner k8s_io_client_go_kubernetes.Interface + admissionregistrationv1 k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface + admissionregistrationv1beta1 k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface + appsv1 k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface + appsv1beta1 k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface + appsv1beta2 k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface + authenticationv1 k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface + authenticationv1beta1 k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface + authorizationv1 k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface + authorizationv1beta1 k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface + autoscalingv1 k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface + autoscalingv2 k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface + autoscalingv2beta1 k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface + autoscalingv2beta2 k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface + batchv1 k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface + batchv1beta1 k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface + certificatesv1 k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface + certificatesv1beta1 k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface + coordinationv1 k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface + coordinationv1beta1 k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface + corev1 k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface + discoveryv1 k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface + discoveryv1beta1 k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface + eventsv1 k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface + eventsv1beta1 k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface + extensionsv1beta1 k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface + flowcontrolv1alpha1 k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface + flowcontrolv1beta1 k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface + flowcontrolv1beta2 k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface + internalv1alpha1 k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface + networkingv1 k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface + networkingv1alpha1 k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface + networkingv1beta1 k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface + nodev1 k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface + nodev1alpha1 k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface + nodev1beta1 k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface + policyv1 k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface + policyv1beta1 k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface + rbacv1 k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface + rbacv1alpha1 k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface + rbacv1beta1 k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface + schedulingv1 k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface + schedulingv1alpha1 k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface + schedulingv1beta1 k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface + storagev1 k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface + storagev1alpha1 k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface + storagev1beta1 k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface } -type wrapper struct { - k8s_io_client_go_kubernetes.Interface +func (c *clientset) Discovery() discovery.DiscoveryInterface { + return c.inner.Discovery() +} +func (c *clientset) AdmissionregistrationV1() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { + return c.admissionregistrationv1 +} +func (c *clientset) AdmissionregistrationV1beta1() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { + return c.admissionregistrationv1beta1 +} +func (c *clientset) AppsV1() k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { + return c.appsv1 +} +func (c *clientset) AppsV1beta1() k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { + return c.appsv1beta1 +} +func (c *clientset) AppsV1beta2() k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { + return c.appsv1beta2 +} +func (c *clientset) AuthenticationV1() k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { + return c.authenticationv1 +} +func (c *clientset) AuthenticationV1beta1() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { + return c.authenticationv1beta1 +} +func (c *clientset) AuthorizationV1() k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { + return c.authorizationv1 +} +func (c *clientset) AuthorizationV1beta1() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { + return c.authorizationv1beta1 +} +func (c *clientset) AutoscalingV1() k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { + return c.autoscalingv1 +} +func (c *clientset) AutoscalingV2() k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { + return c.autoscalingv2 +} +func (c *clientset) AutoscalingV2beta1() k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { + return c.autoscalingv2beta1 +} +func (c *clientset) AutoscalingV2beta2() k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { + return c.autoscalingv2beta2 +} +func (c *clientset) BatchV1() k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { + return c.batchv1 +} +func (c *clientset) BatchV1beta1() k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { + return c.batchv1beta1 +} +func (c *clientset) CertificatesV1() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { + return c.certificatesv1 +} +func (c *clientset) CertificatesV1beta1() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { + return c.certificatesv1beta1 +} +func (c *clientset) CoordinationV1() k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { + return c.coordinationv1 +} +func (c *clientset) CoordinationV1beta1() k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { + return c.coordinationv1beta1 +} +func (c *clientset) CoreV1() k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { + return c.corev1 +} +func (c *clientset) DiscoveryV1() k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { + return c.discoveryv1 +} +func (c *clientset) DiscoveryV1beta1() k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { + return c.discoveryv1beta1 +} +func (c *clientset) EventsV1() k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { + return c.eventsv1 +} +func (c *clientset) EventsV1beta1() k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { + return c.eventsv1beta1 +} +func (c *clientset) ExtensionsV1beta1() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { + return c.extensionsv1beta1 +} +func (c *clientset) FlowcontrolV1alpha1() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { + return c.flowcontrolv1alpha1 +} +func (c *clientset) FlowcontrolV1beta1() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { + return c.flowcontrolv1beta1 +} +func (c *clientset) FlowcontrolV1beta2() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { + return c.flowcontrolv1beta2 +} +func (c *clientset) InternalV1alpha1() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { + return c.internalv1alpha1 +} +func (c *clientset) NetworkingV1() k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { + return c.networkingv1 +} +func (c *clientset) NetworkingV1alpha1() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { + return c.networkingv1alpha1 +} +func (c *clientset) NetworkingV1beta1() k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { + return c.networkingv1beta1 +} +func (c *clientset) NodeV1() k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { + return c.nodev1 +} +func (c *clientset) NodeV1alpha1() k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { + return c.nodev1alpha1 +} +func (c *clientset) NodeV1beta1() k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { + return c.nodev1beta1 +} +func (c *clientset) PolicyV1() k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { + return c.policyv1 +} +func (c *clientset) PolicyV1beta1() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { + return c.policyv1beta1 +} +func (c *clientset) RbacV1() k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { + return c.rbacv1 +} +func (c *clientset) RbacV1alpha1() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { + return c.rbacv1alpha1 +} +func (c *clientset) RbacV1beta1() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { + return c.rbacv1beta1 +} +func (c *clientset) SchedulingV1() k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { + return c.schedulingv1 +} +func (c *clientset) SchedulingV1alpha1() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { + return c.schedulingv1alpha1 +} +func (c *clientset) SchedulingV1beta1() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { + return c.schedulingv1beta1 +} +func (c *clientset) StorageV1() k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { + return c.storagev1 +} +func (c *clientset) StorageV1alpha1() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { + return c.storagev1alpha1 +} +func (c *clientset) StorageV1beta1() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { + return c.storagev1beta1 } -type NewOption func(Interface) Interface - -func NewForConfig(c *k8s_io_client_go_rest.Config, opts ...NewOption) (Interface, error) { - inner, err := k8s_io_client_go_kubernetes.NewForConfig(c) - if err != nil { - return nil, err - } - return From(inner, opts...), nil -} - -func NewForConfigAndClient(c *k8s_io_client_go_rest.Config, httpClient *net_http.Client, opts ...NewOption) (Interface, error) { - inner, err := k8s_io_client_go_kubernetes.NewForConfigAndClient(c, httpClient) - if err != nil { - return nil, err - } - return From(inner, opts...), nil -} - -func NewForConfigOrDie(c *k8s_io_client_go_rest.Config, opts ...NewOption) Interface { - return From(k8s_io_client_go_kubernetes.NewForConfigOrDie(c), opts...) -} - -func New(c k8s_io_client_go_rest.Interface, opts ...NewOption) Interface { - return From(k8s_io_client_go_kubernetes.New(c), opts...) -} - -func from(inner k8s_io_client_go_kubernetes.Interface, opts ...NewOption) Interface { - return &wrapper{inner} -} - -func From(inner k8s_io_client_go_kubernetes.Interface, opts ...NewOption) Interface { - i := from(inner) - for _, opt := range opts { - i = opt(i) - } - return i -} - -func (i *wrapper) WithMetrics(m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) Interface { - return from(github_com_kyverno_kyverno_pkg_clients_middleware_metrics_kube.Wrap(i, m, t)) -} - -func WithMetrics(m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) NewOption { - return func(i Interface) Interface { - return i.WithMetrics(m, t) +func WrapWithMetrics(inner k8s_io_client_go_kubernetes.Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes.Interface { + return &clientset{ + inner: inner, + admissionregistrationv1: admissionregistrationv1.WithMetrics(inner.AdmissionregistrationV1(), metrics, clientType), + admissionregistrationv1beta1: admissionregistrationv1beta1.WithMetrics(inner.AdmissionregistrationV1beta1(), metrics, clientType), + appsv1: appsv1.WithMetrics(inner.AppsV1(), metrics, clientType), + appsv1beta1: appsv1beta1.WithMetrics(inner.AppsV1beta1(), metrics, clientType), + appsv1beta2: appsv1beta2.WithMetrics(inner.AppsV1beta2(), metrics, clientType), + authenticationv1: authenticationv1.WithMetrics(inner.AuthenticationV1(), metrics, clientType), + authenticationv1beta1: authenticationv1beta1.WithMetrics(inner.AuthenticationV1beta1(), metrics, clientType), + authorizationv1: authorizationv1.WithMetrics(inner.AuthorizationV1(), metrics, clientType), + authorizationv1beta1: authorizationv1beta1.WithMetrics(inner.AuthorizationV1beta1(), metrics, clientType), + autoscalingv1: autoscalingv1.WithMetrics(inner.AutoscalingV1(), metrics, clientType), + autoscalingv2: autoscalingv2.WithMetrics(inner.AutoscalingV2(), metrics, clientType), + autoscalingv2beta1: autoscalingv2beta1.WithMetrics(inner.AutoscalingV2beta1(), metrics, clientType), + autoscalingv2beta2: autoscalingv2beta2.WithMetrics(inner.AutoscalingV2beta2(), metrics, clientType), + batchv1: batchv1.WithMetrics(inner.BatchV1(), metrics, clientType), + batchv1beta1: batchv1beta1.WithMetrics(inner.BatchV1beta1(), metrics, clientType), + certificatesv1: certificatesv1.WithMetrics(inner.CertificatesV1(), metrics, clientType), + certificatesv1beta1: certificatesv1beta1.WithMetrics(inner.CertificatesV1beta1(), metrics, clientType), + coordinationv1: coordinationv1.WithMetrics(inner.CoordinationV1(), metrics, clientType), + coordinationv1beta1: coordinationv1beta1.WithMetrics(inner.CoordinationV1beta1(), metrics, clientType), + corev1: corev1.WithMetrics(inner.CoreV1(), metrics, clientType), + discoveryv1: discoveryv1.WithMetrics(inner.DiscoveryV1(), metrics, clientType), + discoveryv1beta1: discoveryv1beta1.WithMetrics(inner.DiscoveryV1beta1(), metrics, clientType), + eventsv1: eventsv1.WithMetrics(inner.EventsV1(), metrics, clientType), + eventsv1beta1: eventsv1beta1.WithMetrics(inner.EventsV1beta1(), metrics, clientType), + extensionsv1beta1: extensionsv1beta1.WithMetrics(inner.ExtensionsV1beta1(), metrics, clientType), + flowcontrolv1alpha1: flowcontrolv1alpha1.WithMetrics(inner.FlowcontrolV1alpha1(), metrics, clientType), + flowcontrolv1beta1: flowcontrolv1beta1.WithMetrics(inner.FlowcontrolV1beta1(), metrics, clientType), + flowcontrolv1beta2: flowcontrolv1beta2.WithMetrics(inner.FlowcontrolV1beta2(), metrics, clientType), + internalv1alpha1: internalv1alpha1.WithMetrics(inner.InternalV1alpha1(), metrics, clientType), + networkingv1: networkingv1.WithMetrics(inner.NetworkingV1(), metrics, clientType), + networkingv1alpha1: networkingv1alpha1.WithMetrics(inner.NetworkingV1alpha1(), metrics, clientType), + networkingv1beta1: networkingv1beta1.WithMetrics(inner.NetworkingV1beta1(), metrics, clientType), + nodev1: nodev1.WithMetrics(inner.NodeV1(), metrics, clientType), + nodev1alpha1: nodev1alpha1.WithMetrics(inner.NodeV1alpha1(), metrics, clientType), + nodev1beta1: nodev1beta1.WithMetrics(inner.NodeV1beta1(), metrics, clientType), + policyv1: policyv1.WithMetrics(inner.PolicyV1(), metrics, clientType), + policyv1beta1: policyv1beta1.WithMetrics(inner.PolicyV1beta1(), metrics, clientType), + rbacv1: rbacv1.WithMetrics(inner.RbacV1(), metrics, clientType), + rbacv1alpha1: rbacv1alpha1.WithMetrics(inner.RbacV1alpha1(), metrics, clientType), + rbacv1beta1: rbacv1beta1.WithMetrics(inner.RbacV1beta1(), metrics, clientType), + schedulingv1: schedulingv1.WithMetrics(inner.SchedulingV1(), metrics, clientType), + schedulingv1alpha1: schedulingv1alpha1.WithMetrics(inner.SchedulingV1alpha1(), metrics, clientType), + schedulingv1beta1: schedulingv1beta1.WithMetrics(inner.SchedulingV1beta1(), metrics, clientType), + storagev1: storagev1.WithMetrics(inner.StorageV1(), metrics, clientType), + storagev1alpha1: storagev1alpha1.WithMetrics(inner.StorageV1alpha1(), metrics, clientType), + storagev1beta1: storagev1beta1.WithMetrics(inner.StorageV1beta1(), metrics, clientType), } } -func (i *wrapper) WithTracing() Interface { - return from(github_com_kyverno_kyverno_pkg_clients_middleware_tracing_kube.Wrap(i)) -} - -func WithTracing() NewOption { - return func(i Interface) Interface { - return i.WithTracing() +func WrapWithTracing(inner k8s_io_client_go_kubernetes.Interface) k8s_io_client_go_kubernetes.Interface { + return &clientset{ + inner: inner, + admissionregistrationv1: admissionregistrationv1.WithTracing(inner.AdmissionregistrationV1(), "AdmissionregistrationV1"), + admissionregistrationv1beta1: admissionregistrationv1beta1.WithTracing(inner.AdmissionregistrationV1beta1(), "AdmissionregistrationV1beta1"), + appsv1: appsv1.WithTracing(inner.AppsV1(), "AppsV1"), + appsv1beta1: appsv1beta1.WithTracing(inner.AppsV1beta1(), "AppsV1beta1"), + appsv1beta2: appsv1beta2.WithTracing(inner.AppsV1beta2(), "AppsV1beta2"), + authenticationv1: authenticationv1.WithTracing(inner.AuthenticationV1(), "AuthenticationV1"), + authenticationv1beta1: authenticationv1beta1.WithTracing(inner.AuthenticationV1beta1(), "AuthenticationV1beta1"), + authorizationv1: authorizationv1.WithTracing(inner.AuthorizationV1(), "AuthorizationV1"), + authorizationv1beta1: authorizationv1beta1.WithTracing(inner.AuthorizationV1beta1(), "AuthorizationV1beta1"), + autoscalingv1: autoscalingv1.WithTracing(inner.AutoscalingV1(), "AutoscalingV1"), + autoscalingv2: autoscalingv2.WithTracing(inner.AutoscalingV2(), "AutoscalingV2"), + autoscalingv2beta1: autoscalingv2beta1.WithTracing(inner.AutoscalingV2beta1(), "AutoscalingV2beta1"), + autoscalingv2beta2: autoscalingv2beta2.WithTracing(inner.AutoscalingV2beta2(), "AutoscalingV2beta2"), + batchv1: batchv1.WithTracing(inner.BatchV1(), "BatchV1"), + batchv1beta1: batchv1beta1.WithTracing(inner.BatchV1beta1(), "BatchV1beta1"), + certificatesv1: certificatesv1.WithTracing(inner.CertificatesV1(), "CertificatesV1"), + certificatesv1beta1: certificatesv1beta1.WithTracing(inner.CertificatesV1beta1(), "CertificatesV1beta1"), + coordinationv1: coordinationv1.WithTracing(inner.CoordinationV1(), "CoordinationV1"), + coordinationv1beta1: coordinationv1beta1.WithTracing(inner.CoordinationV1beta1(), "CoordinationV1beta1"), + corev1: corev1.WithTracing(inner.CoreV1(), "CoreV1"), + discoveryv1: discoveryv1.WithTracing(inner.DiscoveryV1(), "DiscoveryV1"), + discoveryv1beta1: discoveryv1beta1.WithTracing(inner.DiscoveryV1beta1(), "DiscoveryV1beta1"), + eventsv1: eventsv1.WithTracing(inner.EventsV1(), "EventsV1"), + eventsv1beta1: eventsv1beta1.WithTracing(inner.EventsV1beta1(), "EventsV1beta1"), + extensionsv1beta1: extensionsv1beta1.WithTracing(inner.ExtensionsV1beta1(), "ExtensionsV1beta1"), + flowcontrolv1alpha1: flowcontrolv1alpha1.WithTracing(inner.FlowcontrolV1alpha1(), "FlowcontrolV1alpha1"), + flowcontrolv1beta1: flowcontrolv1beta1.WithTracing(inner.FlowcontrolV1beta1(), "FlowcontrolV1beta1"), + flowcontrolv1beta2: flowcontrolv1beta2.WithTracing(inner.FlowcontrolV1beta2(), "FlowcontrolV1beta2"), + internalv1alpha1: internalv1alpha1.WithTracing(inner.InternalV1alpha1(), "InternalV1alpha1"), + networkingv1: networkingv1.WithTracing(inner.NetworkingV1(), "NetworkingV1"), + networkingv1alpha1: networkingv1alpha1.WithTracing(inner.NetworkingV1alpha1(), "NetworkingV1alpha1"), + networkingv1beta1: networkingv1beta1.WithTracing(inner.NetworkingV1beta1(), "NetworkingV1beta1"), + nodev1: nodev1.WithTracing(inner.NodeV1(), "NodeV1"), + nodev1alpha1: nodev1alpha1.WithTracing(inner.NodeV1alpha1(), "NodeV1alpha1"), + nodev1beta1: nodev1beta1.WithTracing(inner.NodeV1beta1(), "NodeV1beta1"), + policyv1: policyv1.WithTracing(inner.PolicyV1(), "PolicyV1"), + policyv1beta1: policyv1beta1.WithTracing(inner.PolicyV1beta1(), "PolicyV1beta1"), + rbacv1: rbacv1.WithTracing(inner.RbacV1(), "RbacV1"), + rbacv1alpha1: rbacv1alpha1.WithTracing(inner.RbacV1alpha1(), "RbacV1alpha1"), + rbacv1beta1: rbacv1beta1.WithTracing(inner.RbacV1beta1(), "RbacV1beta1"), + schedulingv1: schedulingv1.WithTracing(inner.SchedulingV1(), "SchedulingV1"), + schedulingv1alpha1: schedulingv1alpha1.WithTracing(inner.SchedulingV1alpha1(), "SchedulingV1alpha1"), + schedulingv1beta1: schedulingv1beta1.WithTracing(inner.SchedulingV1beta1(), "SchedulingV1beta1"), + storagev1: storagev1.WithTracing(inner.StorageV1(), "StorageV1"), + storagev1alpha1: storagev1alpha1.WithTracing(inner.StorageV1alpha1(), "StorageV1alpha1"), + storagev1beta1: storagev1beta1.WithTracing(inner.StorageV1beta1(), "StorageV1beta1"), } } diff --git a/pkg/clients/kube/coordinationv1/client.generated.go b/pkg/clients/kube/coordinationv1/client.generated.go new file mode 100644 index 0000000000..c8b726da52 --- /dev/null +++ b/pkg/clients/kube/coordinationv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + leases "github.com/kyverno/kyverno/pkg/clients/kube/coordinationv1/leases" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_coordination_v1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface, client string) k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Lease", c.clientType) + return leases.WithMetrics(c.inner.Leases(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { + return leases.WithTracing(c.inner.Leases(namespace), c.client, "Lease") +} diff --git a/pkg/clients/kube/coordinationv1/leases/resource.generated.go b/pkg/clients/kube/coordinationv1/leases/resource.generated.go new file mode 100644 index 0000000000..a3209e612a --- /dev/null +++ b/pkg/clients/kube/coordinationv1/leases/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_coordination_v1 "k8s.io/client-go/applyconfigurations/coordination/v1" + k8s_io_client_go_kubernetes_typed_coordination_v1 "k8s.io/client-go/kubernetes/typed/coordination/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface, client, kind string) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1.Lease, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1.Lease, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_coordination_v1.Lease, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1.LeaseList, error) { + defer c.recorder.Record("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) (*k8s_io_api_coordination_v1.Lease, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1.Lease, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_coordination_v1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1.LeaseList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_coordination_v1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/coordinationv1beta1/client.generated.go b/pkg/clients/kube/coordinationv1beta1/client.generated.go new file mode 100644 index 0000000000..adf9254d05 --- /dev/null +++ b/pkg/clients/kube/coordinationv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + leases "github.com/kyverno/kyverno/pkg/clients/kube/coordinationv1beta1/leases" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_coordination_v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Lease", c.clientType) + return leases.WithMetrics(c.inner.Leases(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { + return leases.WithTracing(c.inner.Leases(namespace), c.client, "Lease") +} diff --git a/pkg/clients/kube/coordinationv1beta1/leases/resource.generated.go b/pkg/clients/kube/coordinationv1beta1/leases/resource.generated.go new file mode 100644 index 0000000000..7ab3b918d9 --- /dev/null +++ b/pkg/clients/kube/coordinationv1beta1/leases/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_coordination_v1beta1 "k8s.io/api/coordination/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_coordination_v1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" + k8s_io_client_go_kubernetes_typed_coordination_v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface, client, kind string) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1beta1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_coordination_v1beta1.Lease, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1beta1.LeaseList, error) { + defer c.recorder.Record("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) (*k8s_io_api_coordination_v1beta1.Lease, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1beta1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1beta1.LeaseList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_coordination_v1beta1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/client.generated.go b/pkg/clients/kube/corev1/client.generated.go new file mode 100644 index 0000000000..da22882289 --- /dev/null +++ b/pkg/clients/kube/corev1/client.generated.go @@ -0,0 +1,162 @@ +package client + +import ( + componentstatuses "github.com/kyverno/kyverno/pkg/clients/kube/corev1/componentstatuses" + configmaps "github.com/kyverno/kyverno/pkg/clients/kube/corev1/configmaps" + endpoints "github.com/kyverno/kyverno/pkg/clients/kube/corev1/endpoints" + events "github.com/kyverno/kyverno/pkg/clients/kube/corev1/events" + limitranges "github.com/kyverno/kyverno/pkg/clients/kube/corev1/limitranges" + namespaces "github.com/kyverno/kyverno/pkg/clients/kube/corev1/namespaces" + nodes "github.com/kyverno/kyverno/pkg/clients/kube/corev1/nodes" + persistentvolumeclaims "github.com/kyverno/kyverno/pkg/clients/kube/corev1/persistentvolumeclaims" + persistentvolumes "github.com/kyverno/kyverno/pkg/clients/kube/corev1/persistentvolumes" + pods "github.com/kyverno/kyverno/pkg/clients/kube/corev1/pods" + podtemplates "github.com/kyverno/kyverno/pkg/clients/kube/corev1/podtemplates" + replicationcontrollers "github.com/kyverno/kyverno/pkg/clients/kube/corev1/replicationcontrollers" + resourcequotas "github.com/kyverno/kyverno/pkg/clients/kube/corev1/resourcequotas" + secrets "github.com/kyverno/kyverno/pkg/clients/kube/corev1/secrets" + serviceaccounts "github.com/kyverno/kyverno/pkg/clients/kube/corev1/serviceaccounts" + services "github.com/kyverno/kyverno/pkg/clients/kube/corev1/services" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface, client string) k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ComponentStatuses() k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ComponentStatus", c.clientType) + return componentstatuses.WithMetrics(c.inner.ComponentStatuses(), recorder) +} +func (c *withMetrics) ConfigMaps(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ConfigMap", c.clientType) + return configmaps.WithMetrics(c.inner.ConfigMaps(namespace), recorder) +} +func (c *withMetrics) Endpoints(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Endpoints", c.clientType) + return endpoints.WithMetrics(c.inner.Endpoints(namespace), recorder) +} +func (c *withMetrics) Events(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Event", c.clientType) + return events.WithMetrics(c.inner.Events(namespace), recorder) +} +func (c *withMetrics) LimitRanges(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LimitRange", c.clientType) + return limitranges.WithMetrics(c.inner.LimitRanges(namespace), recorder) +} +func (c *withMetrics) Namespaces() k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "Namespace", c.clientType) + return namespaces.WithMetrics(c.inner.Namespaces(), recorder) +} +func (c *withMetrics) Nodes() k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "Node", c.clientType) + return nodes.WithMetrics(c.inner.Nodes(), recorder) +} +func (c *withMetrics) PersistentVolumeClaims(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PersistentVolumeClaim", c.clientType) + return persistentvolumeclaims.WithMetrics(c.inner.PersistentVolumeClaims(namespace), recorder) +} +func (c *withMetrics) PersistentVolumes() k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PersistentVolume", c.clientType) + return persistentvolumes.WithMetrics(c.inner.PersistentVolumes(), recorder) +} +func (c *withMetrics) PodTemplates(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PodTemplate", c.clientType) + return podtemplates.WithMetrics(c.inner.PodTemplates(namespace), recorder) +} +func (c *withMetrics) Pods(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Pod", c.clientType) + return pods.WithMetrics(c.inner.Pods(namespace), recorder) +} +func (c *withMetrics) ReplicationControllers(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicationController", c.clientType) + return replicationcontrollers.WithMetrics(c.inner.ReplicationControllers(namespace), recorder) +} +func (c *withMetrics) ResourceQuotas(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ResourceQuota", c.clientType) + return resourcequotas.WithMetrics(c.inner.ResourceQuotas(namespace), recorder) +} +func (c *withMetrics) Secrets(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Secret", c.clientType) + return secrets.WithMetrics(c.inner.Secrets(namespace), recorder) +} +func (c *withMetrics) ServiceAccounts(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ServiceAccount", c.clientType) + return serviceaccounts.WithMetrics(c.inner.ServiceAccounts(namespace), recorder) +} +func (c *withMetrics) Services(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Service", c.clientType) + return services.WithMetrics(c.inner.Services(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ComponentStatuses() k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { + return componentstatuses.WithTracing(c.inner.ComponentStatuses(), c.client, "ComponentStatus") +} +func (c *withTracing) ConfigMaps(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { + return configmaps.WithTracing(c.inner.ConfigMaps(namespace), c.client, "ConfigMap") +} +func (c *withTracing) Endpoints(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { + return endpoints.WithTracing(c.inner.Endpoints(namespace), c.client, "Endpoints") +} +func (c *withTracing) Events(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { + return events.WithTracing(c.inner.Events(namespace), c.client, "Event") +} +func (c *withTracing) LimitRanges(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { + return limitranges.WithTracing(c.inner.LimitRanges(namespace), c.client, "LimitRange") +} +func (c *withTracing) Namespaces() k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { + return namespaces.WithTracing(c.inner.Namespaces(), c.client, "Namespace") +} +func (c *withTracing) Nodes() k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { + return nodes.WithTracing(c.inner.Nodes(), c.client, "Node") +} +func (c *withTracing) PersistentVolumeClaims(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { + return persistentvolumeclaims.WithTracing(c.inner.PersistentVolumeClaims(namespace), c.client, "PersistentVolumeClaim") +} +func (c *withTracing) PersistentVolumes() k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { + return persistentvolumes.WithTracing(c.inner.PersistentVolumes(), c.client, "PersistentVolume") +} +func (c *withTracing) PodTemplates(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { + return podtemplates.WithTracing(c.inner.PodTemplates(namespace), c.client, "PodTemplate") +} +func (c *withTracing) Pods(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { + return pods.WithTracing(c.inner.Pods(namespace), c.client, "Pod") +} +func (c *withTracing) ReplicationControllers(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { + return replicationcontrollers.WithTracing(c.inner.ReplicationControllers(namespace), c.client, "ReplicationController") +} +func (c *withTracing) ResourceQuotas(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { + return resourcequotas.WithTracing(c.inner.ResourceQuotas(namespace), c.client, "ResourceQuota") +} +func (c *withTracing) Secrets(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { + return secrets.WithTracing(c.inner.Secrets(namespace), c.client, "Secret") +} +func (c *withTracing) ServiceAccounts(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { + return serviceaccounts.WithTracing(c.inner.ServiceAccounts(namespace), c.client, "ServiceAccount") +} +func (c *withTracing) Services(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { + return services.WithTracing(c.inner.Services(namespace), c.client, "Service") +} diff --git a/pkg/clients/kube/corev1/componentstatuses/resource.generated.go b/pkg/clients/kube/corev1/componentstatuses/resource.generated.go new file mode 100644 index 0000000000..c2f5916591 --- /dev/null +++ b/pkg/clients/kube/corev1/componentstatuses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ComponentStatusApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ComponentStatus, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ComponentStatusList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ComponentStatus, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ComponentStatusApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ComponentStatusList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.ComponentStatus, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/configmaps/resource.generated.go b/pkg/clients/kube/corev1/configmaps/resource.generated.go new file mode 100644 index 0000000000..d154db4699 --- /dev/null +++ b/pkg/clients/kube/corev1/configmaps/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ConfigMapApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ConfigMap, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ConfigMapList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ConfigMap, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ConfigMapApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ConfigMapList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.ConfigMap, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/endpoints/resource.generated.go b/pkg/clients/kube/corev1/endpoints/resource.generated.go new file mode 100644 index 0000000000..17a2945486 --- /dev/null +++ b/pkg/clients/kube/corev1/endpoints/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EndpointsApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Endpoints, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Endpoints, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Endpoints, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EndpointsList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Endpoints, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Endpoints, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EndpointsApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Endpoints, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Endpoints, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Endpoints, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EndpointsList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Endpoints, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Endpoints, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/events/resource.generated.go b/pkg/clients/kube/corev1/events/resource.generated.go new file mode 100644 index 0000000000..767f23a7f6 --- /dev/null +++ b/pkg/clients/kube/corev1/events/resource.generated.go @@ -0,0 +1,278 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_fields "k8s.io/apimachinery/pkg/fields" + k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) CreateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("create_with_event_namespace") + return c.inner.CreateWithEventNamespace(arg0) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetFieldSelector(arg0 *string, arg1 *string, arg2 *string, arg3 *string) k8s_io_apimachinery_pkg_fields.Selector { + defer c.recorder.Record("get_field_selector") + return c.inner.GetFieldSelector(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EventList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) PatchWithEventNamespace(arg0 *k8s_io_api_core_v1.Event, arg1 []uint8) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("patch_with_event_namespace") + return c.inner.PatchWithEventNamespace(arg0, arg1) +} +func (c *withMetrics) Search(arg0 *k8s_io_apimachinery_pkg_runtime.Scheme, arg1 k8s_io_apimachinery_pkg_runtime.Object) (*k8s_io_api_core_v1.EventList, error) { + defer c.recorder.Record("search") + return c.inner.Search(arg0, arg1) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { + defer c.recorder.Record("update_with_event_namespace") + return c.inner.UpdateWithEventNamespace(arg0) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) CreateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { + ret0, ret1 := c.inner.CreateWithEventNamespace(arg0) + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetFieldSelector(arg0 *string, arg1 *string, arg2 *string, arg3 *string) k8s_io_apimachinery_pkg_fields.Selector { + ret0 := c.inner.GetFieldSelector(arg0, arg1, arg2, arg3) + return ret0 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EventList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) PatchWithEventNamespace(arg0 *k8s_io_api_core_v1.Event, arg1 []uint8) (*k8s_io_api_core_v1.Event, error) { + ret0, ret1 := c.inner.PatchWithEventNamespace(arg0, arg1) + return ret0, ret1 +} +func (c *withTracing) Search(arg0 *k8s_io_apimachinery_pkg_runtime.Scheme, arg1 k8s_io_apimachinery_pkg_runtime.Object) (*k8s_io_api_core_v1.EventList, error) { + ret0, ret1 := c.inner.Search(arg0, arg1) + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { + ret0, ret1 := c.inner.UpdateWithEventNamespace(arg0) + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/limitranges/resource.generated.go b/pkg/clients/kube/corev1/limitranges/resource.generated.go new file mode 100644 index 0000000000..d2aee2e023 --- /dev/null +++ b/pkg/clients/kube/corev1/limitranges/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.LimitRangeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.LimitRange, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.LimitRange, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.LimitRange, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.LimitRangeList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.LimitRange, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.LimitRange, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.LimitRangeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.LimitRange, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.LimitRange, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.LimitRange, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.LimitRangeList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.LimitRange, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.LimitRange, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/namespaces/resource.generated.go b/pkg/clients/kube/corev1/namespaces/resource.generated.go new file mode 100644 index 0000000000..9c8f8a4ee0 --- /dev/null +++ b/pkg/clients/kube/corev1/namespaces/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) Finalize(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("finalize") + return c.inner.Finalize(arg0, arg1, arg2) +} +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NamespaceList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Finalize(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Finalize"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Finalize"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Finalize(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NamespaceList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/nodes/resource.generated.go b/pkg/clients/kube/corev1/nodes/resource.generated.go new file mode 100644 index 0000000000..b7afdf7343 --- /dev/null +++ b/pkg/clients/kube/corev1/nodes/resource.generated.go @@ -0,0 +1,302 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NodeList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) PatchStatus(arg0 context.Context, arg1 string, arg2 []uint8) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("patch_status") + return c.inner.PatchStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NodeList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) PatchStatus(arg0 context.Context, arg1 string, arg2 []uint8) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "PatchStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "PatchStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.PatchStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/persistentvolumeclaims/resource.generated.go b/pkg/clients/kube/corev1/persistentvolumeclaims/resource.generated.go new file mode 100644 index 0000000000..ee2be339ca --- /dev/null +++ b/pkg/clients/kube/corev1/persistentvolumeclaims/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeClaimList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeClaimList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/persistentvolumes/resource.generated.go b/pkg/clients/kube/corev1/persistentvolumes/resource.generated.go new file mode 100644 index 0000000000..43bb2c4280 --- /dev/null +++ b/pkg/clients/kube/corev1/persistentvolumes/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/pods/resource.generated.go b/pkg/clients/kube/corev1/pods/resource.generated.go new file mode 100644 index 0000000000..c9a7589572 --- /dev/null +++ b/pkg/clients/kube/corev1/pods/resource.generated.go @@ -0,0 +1,409 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_api_policy_v1 "k8s.io/api/policy/v1" + k8s_io_api_policy_v1beta1 "k8s.io/api/policy/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" + k8s_io_client_go_rest "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Bind(arg0 context.Context, arg1 *k8s_io_api_core_v1.Binding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { + defer c.recorder.Record("bind") + return c.inner.Bind(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("delete_collection") + return c.inner.DeleteCollection(arg0, arg1, arg2) +} +func (c *withMetrics) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { + defer c.recorder.Record("evict") + return c.inner.Evict(arg0, arg1) +} +func (c *withMetrics) EvictV1(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { + defer c.recorder.Record("evict_v1") + return c.inner.EvictV1(arg0, arg1) +} +func (c *withMetrics) EvictV1beta1(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { + defer c.recorder.Record("evict_v1beta1") + return c.inner.EvictV1beta1(arg0, arg1) +} +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetLogs(arg0 string, arg1 *k8s_io_api_core_v1.PodLogOptions) *k8s_io_client_go_rest.Request { + defer c.recorder.Record("get_logs") + return c.inner.GetLogs(arg0, arg1) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { + defer c.recorder.Record("proxy_get") + return c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateEphemeralContainers(arg0 context.Context, arg1 string, arg2 *k8s_io_api_core_v1.Pod, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("update_ephemeral_containers") + return c.inner.UpdateEphemeralContainers(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Bind(arg0 context.Context, arg1 *k8s_io_api_core_v1.Binding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Bind"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Bind"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Bind(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Evict"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Evict"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Evict(arg0, arg1) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) EvictV1(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "EvictV1"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "EvictV1"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.EvictV1(arg0, arg1) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) EvictV1beta1(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "EvictV1beta1"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "EvictV1beta1"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.EvictV1beta1(arg0, arg1) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetLogs(arg0 string, arg1 *k8s_io_api_core_v1.PodLogOptions) *k8s_io_client_go_rest.Request { + ret0 := c.inner.GetLogs(arg0, arg1) + return ret0 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { + ret0 := c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) + return ret0 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateEphemeralContainers(arg0 context.Context, arg1 string, arg2 *k8s_io_api_core_v1.Pod, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateEphemeralContainers"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateEphemeralContainers"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateEphemeralContainers(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/podtemplates/resource.generated.go b/pkg/clients/kube/corev1/podtemplates/resource.generated.go new file mode 100644 index 0000000000..8a68061dbc --- /dev/null +++ b/pkg/clients/kube/corev1/podtemplates/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodTemplateApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.PodTemplate, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodTemplateList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.PodTemplate, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodTemplateApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodTemplateList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.PodTemplate, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/replicationcontrollers/resource.generated.go b/pkg/clients/kube/corev1/replicationcontrollers/resource.generated.go new file mode 100644 index 0000000000..b58a0214af --- /dev/null +++ b/pkg/clients/kube/corev1/replicationcontrollers/resource.generated.go @@ -0,0 +1,325 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ReplicationControllerList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ReplicationControllerList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/resourcequotas/resource.generated.go b/pkg/clients/kube/corev1/resourcequotas/resource.generated.go new file mode 100644 index 0000000000..264137cf5e --- /dev/null +++ b/pkg/clients/kube/corev1/resourcequotas/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ResourceQuotaList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ResourceQuotaList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/secrets/resource.generated.go b/pkg/clients/kube/corev1/secrets/resource.generated.go new file mode 100644 index 0000000000..e58ad8f21e --- /dev/null +++ b/pkg/clients/kube/corev1/secrets/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.SecretApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Secret, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Secret, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Secret, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.SecretList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Secret, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Secret, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.SecretApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Secret, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Secret, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Secret, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.SecretList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Secret, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Secret, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/serviceaccounts/resource.generated.go b/pkg/clients/kube/corev1/serviceaccounts/resource.generated.go new file mode 100644 index 0000000000..e1e1b02bad --- /dev/null +++ b/pkg/clients/kube/corev1/serviceaccounts/resource.generated.go @@ -0,0 +1,259 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_authentication_v1 "k8s.io/api/authentication/v1" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceAccountApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) CreateToken(arg0 context.Context, arg1 string, arg2 *k8s_io_api_authentication_v1.TokenRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenRequest, error) { + defer c.recorder.Record("create_token") + return c.inner.CreateToken(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ServiceAccount, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceAccountList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.ServiceAccount, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceAccountApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) CreateToken(arg0 context.Context, arg1 string, arg2 *k8s_io_api_authentication_v1.TokenRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "CreateToken"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "CreateToken"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.CreateToken(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceAccountList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.ServiceAccount, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/corev1/services/resource.generated.go b/pkg/clients/kube/corev1/services/resource.generated.go new file mode 100644 index 0000000000..0421341de2 --- /dev/null +++ b/pkg/clients/kube/corev1/services/resource.generated.go @@ -0,0 +1,267 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" + k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" + k8s_io_client_go_rest "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface, client, kind string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceList, error) { + defer c.recorder.Record("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) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { + defer c.recorder.Record("proxy_get") + return c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { + ret0 := c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) + return ret0 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/discoveryv1/client.generated.go b/pkg/clients/kube/discoveryv1/client.generated.go new file mode 100644 index 0000000000..3d78965d4c --- /dev/null +++ b/pkg/clients/kube/discoveryv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + endpointslices "github.com/kyverno/kyverno/pkg/clients/kube/discoveryv1/endpointslices" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_discovery_v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface, client string) k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "EndpointSlice", c.clientType) + return endpointslices.WithMetrics(c.inner.EndpointSlices(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { + return endpointslices.WithTracing(c.inner.EndpointSlices(namespace), c.client, "EndpointSlice") +} diff --git a/pkg/clients/kube/discoveryv1/endpointslices/resource.generated.go b/pkg/clients/kube/discoveryv1/endpointslices/resource.generated.go new file mode 100644 index 0000000000..7006a20eac --- /dev/null +++ b/pkg/clients/kube/discoveryv1/endpointslices/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_discovery_v1 "k8s.io/api/discovery/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_discovery_v1 "k8s.io/client-go/applyconfigurations/discovery/v1" + k8s_io_client_go_kubernetes_typed_discovery_v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface, client, kind string) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1.EndpointSliceList, error) { + defer c.recorder.Record("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) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1.EndpointSliceList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/discoveryv1beta1/client.generated.go b/pkg/clients/kube/discoveryv1beta1/client.generated.go new file mode 100644 index 0000000000..254a467416 --- /dev/null +++ b/pkg/clients/kube/discoveryv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + endpointslices "github.com/kyverno/kyverno/pkg/clients/kube/discoveryv1beta1/endpointslices" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_discovery_v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "EndpointSlice", c.clientType) + return endpointslices.WithMetrics(c.inner.EndpointSlices(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { + return endpointslices.WithTracing(c.inner.EndpointSlices(namespace), c.client, "EndpointSlice") +} diff --git a/pkg/clients/kube/discoveryv1beta1/endpointslices/resource.generated.go b/pkg/clients/kube/discoveryv1beta1/endpointslices/resource.generated.go new file mode 100644 index 0000000000..2f33f7d5ef --- /dev/null +++ b/pkg/clients/kube/discoveryv1beta1/endpointslices/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_discovery_v1beta1 "k8s.io/api/discovery/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_discovery_v1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" + k8s_io_client_go_kubernetes_typed_discovery_v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface, client, kind string) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1beta1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1beta1.EndpointSliceList, error) { + defer c.recorder.Record("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) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1beta1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1beta1.EndpointSliceList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/eventsv1/client.generated.go b/pkg/clients/kube/eventsv1/client.generated.go new file mode 100644 index 0000000000..5632a872f3 --- /dev/null +++ b/pkg/clients/kube/eventsv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + events "github.com/kyverno/kyverno/pkg/clients/kube/eventsv1/events" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_events_v1 "k8s.io/client-go/kubernetes/typed/events/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface, client string) k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Event", c.clientType) + return events.WithMetrics(c.inner.Events(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { + return events.WithTracing(c.inner.Events(namespace), c.client, "Event") +} diff --git a/pkg/clients/kube/eventsv1/events/resource.generated.go b/pkg/clients/kube/eventsv1/events/resource.generated.go new file mode 100644 index 0000000000..e850e0d84d --- /dev/null +++ b/pkg/clients/kube/eventsv1/events/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_events_v1 "k8s.io/api/events/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_events_v1 "k8s.io/client-go/applyconfigurations/events/v1" + k8s_io_client_go_kubernetes_typed_events_v1 "k8s.io/client-go/kubernetes/typed/events/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface, client, kind string) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1.Event, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1.Event, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_events_v1.Event, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1.EventList, error) { + defer c.recorder.Record("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) (*k8s_io_api_events_v1.Event, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1.Event, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_events_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1.EventList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_events_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/eventsv1beta1/client.generated.go b/pkg/clients/kube/eventsv1beta1/client.generated.go new file mode 100644 index 0000000000..87297912e5 --- /dev/null +++ b/pkg/clients/kube/eventsv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + events "github.com/kyverno/kyverno/pkg/clients/kube/eventsv1beta1/events" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_events_v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Event", c.clientType) + return events.WithMetrics(c.inner.Events(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { + return events.WithTracing(c.inner.Events(namespace), c.client, "Event") +} diff --git a/pkg/clients/kube/eventsv1beta1/events/resource.generated.go b/pkg/clients/kube/eventsv1beta1/events/resource.generated.go new file mode 100644 index 0000000000..6486c9fb18 --- /dev/null +++ b/pkg/clients/kube/eventsv1beta1/events/resource.generated.go @@ -0,0 +1,260 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_events_v1beta1 "k8s.io/api/events/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_events_v1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" + k8s_io_client_go_kubernetes_typed_events_v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface, client, kind string) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1beta1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) CreateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("create_with_event_namespace") + return c.inner.CreateWithEventNamespace(arg0) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1beta1.EventList, error) { + defer c.recorder.Record("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) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) PatchWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event, arg1 []uint8) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("patch_with_event_namespace") + return c.inner.PatchWithEventNamespace(arg0, arg1) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { + defer c.recorder.Record("update_with_event_namespace") + return c.inner.UpdateWithEventNamespace(arg0) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1beta1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1beta1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1beta1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) CreateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { + ret0, ret1 := c.inner.CreateWithEventNamespace(arg0) + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_events_v1beta1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1beta1.EventList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_events_v1beta1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) PatchWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event, arg1 []uint8) (*k8s_io_api_events_v1beta1.Event, error) { + ret0, ret1 := c.inner.PatchWithEventNamespace(arg0, arg1) + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1beta1.Event, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { + ret0, ret1 := c.inner.UpdateWithEventNamespace(arg0) + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/extensionsv1beta1/client.generated.go b/pkg/clients/kube/extensionsv1beta1/client.generated.go new file mode 100644 index 0000000000..86e11195d3 --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/client.generated.go @@ -0,0 +1,82 @@ +package client + +import ( + daemonsets "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1/daemonsets" + deployments "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1/deployments" + ingresses "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1/ingresses" + networkpolicies "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1/networkpolicies" + podsecuritypolicies "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1/podsecuritypolicies" + replicasets "github.com/kyverno/kyverno/pkg/clients/kube/extensionsv1beta1/replicasets" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "DaemonSet", c.clientType) + return daemonsets.WithMetrics(c.inner.DaemonSets(namespace), recorder) +} +func (c *withMetrics) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) + return deployments.WithMetrics(c.inner.Deployments(namespace), recorder) +} +func (c *withMetrics) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Ingress", c.clientType) + return ingresses.WithMetrics(c.inner.Ingresses(namespace), recorder) +} +func (c *withMetrics) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "NetworkPolicy", c.clientType) + return networkpolicies.WithMetrics(c.inner.NetworkPolicies(namespace), recorder) +} +func (c *withMetrics) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PodSecurityPolicy", c.clientType) + return podsecuritypolicies.WithMetrics(c.inner.PodSecurityPolicies(), recorder) +} +func (c *withMetrics) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicaSet", c.clientType) + return replicasets.WithMetrics(c.inner.ReplicaSets(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { + return daemonsets.WithTracing(c.inner.DaemonSets(namespace), c.client, "DaemonSet") +} +func (c *withTracing) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { + return deployments.WithTracing(c.inner.Deployments(namespace), c.client, "Deployment") +} +func (c *withTracing) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { + return ingresses.WithTracing(c.inner.Ingresses(namespace), c.client, "Ingress") +} +func (c *withTracing) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { + return networkpolicies.WithTracing(c.inner.NetworkPolicies(namespace), c.client, "NetworkPolicy") +} +func (c *withTracing) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { + return podsecuritypolicies.WithTracing(c.inner.PodSecurityPolicies(), c.client, "PodSecurityPolicy") +} +func (c *withTracing) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { + return replicasets.WithTracing(c.inner.ReplicaSets(namespace), c.client, "ReplicaSet") +} diff --git a/pkg/clients/kube/extensionsv1beta1/daemonsets/resource.generated.go b/pkg/clients/kube/extensionsv1beta1/daemonsets/resource.generated.go new file mode 100644 index 0000000000..edec543eed --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/daemonsets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DaemonSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DaemonSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/extensionsv1beta1/deployments/resource.generated.go b/pkg/clients/kube/extensionsv1beta1/deployments/resource.generated.go new file mode 100644 index 0000000000..9ca6a7ab16 --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/deployments/resource.generated.go @@ -0,0 +1,368 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + defer c.recorder.Record("apply_scale") + return c.inner.ApplyScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DeploymentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Rollback(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DeploymentRollback, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { + defer c.recorder.Record("rollback") + return c.inner.Rollback(arg0, arg1, arg2) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DeploymentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Rollback(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DeploymentRollback, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Rollback"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Rollback"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Rollback(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/extensionsv1beta1/ingresses/resource.generated.go b/pkg/clients/kube/extensionsv1beta1/ingresses/resource.generated.go new file mode 100644 index 0000000000..95e8f3aa0a --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/ingresses/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface, client, kind string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.IngressList, error) { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.IngressList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/extensionsv1beta1/networkpolicies/resource.generated.go b/pkg/clients/kube/extensionsv1beta1/networkpolicies/resource.generated.go new file mode 100644 index 0000000000..908256e44d --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/networkpolicies/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface, client, kind string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicyList, error) { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/extensionsv1beta1/podsecuritypolicies/resource.generated.go b/pkg/clients/kube/extensionsv1beta1/podsecuritypolicies/resource.generated.go new file mode 100644 index 0000000000..27d39a5aa9 --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/podsecuritypolicies/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface, client, kind string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicyList, error) { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/extensionsv1beta1/replicasets/resource.generated.go b/pkg/clients/kube/extensionsv1beta1/replicasets/resource.generated.go new file mode 100644 index 0000000000..60d20aab71 --- /dev/null +++ b/pkg/clients/kube/extensionsv1beta1/replicasets/resource.generated.go @@ -0,0 +1,346 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + defer c.recorder.Record("apply_scale") + return c.inner.ApplyScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + defer c.recorder.Record("get_scale") + return c.inner.GetScale(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + defer c.recorder.Record("update_scale") + return c.inner.UpdateScale(arg0, arg1, arg2, arg3) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "GetScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "GetScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateScale"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateScale"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/flowcontrolv1alpha1/client.generated.go b/pkg/clients/kube/flowcontrolv1alpha1/client.generated.go new file mode 100644 index 0000000000..e1db157438 --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1alpha1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + flowschemas "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1alpha1/flowschemas" + prioritylevelconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1alpha1/prioritylevelconfigurations" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "FlowSchema", c.clientType) + return flowschemas.WithMetrics(c.inner.FlowSchemas(), recorder) +} +func (c *withMetrics) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityLevelConfiguration", c.clientType) + return prioritylevelconfigurations.WithMetrics(c.inner.PriorityLevelConfigurations(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { + return flowschemas.WithTracing(c.inner.FlowSchemas(), c.client, "FlowSchema") +} +func (c *withTracing) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { + return prioritylevelconfigurations.WithTracing(c.inner.PriorityLevelConfigurations(), c.client, "PriorityLevelConfiguration") +} diff --git a/pkg/clients/kube/flowcontrolv1alpha1/flowschemas/resource.generated.go b/pkg/clients/kube/flowcontrolv1alpha1/flowschemas/resource.generated.go new file mode 100644 index 0000000000..c8ff3f90c5 --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1alpha1/flowschemas/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_flowcontrol_v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface, client, kind string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchemaList, error) { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchemaList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/flowcontrolv1alpha1/prioritylevelconfigurations/resource.generated.go b/pkg/clients/kube/flowcontrolv1alpha1/prioritylevelconfigurations/resource.generated.go new file mode 100644 index 0000000000..39bf47f85b --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1alpha1/prioritylevelconfigurations/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_flowcontrol_v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/flowcontrolv1beta1/client.generated.go b/pkg/clients/kube/flowcontrolv1beta1/client.generated.go new file mode 100644 index 0000000000..cb9e5397ef --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1beta1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + flowschemas "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1beta1/flowschemas" + prioritylevelconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1beta1/prioritylevelconfigurations" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "FlowSchema", c.clientType) + return flowschemas.WithMetrics(c.inner.FlowSchemas(), recorder) +} +func (c *withMetrics) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityLevelConfiguration", c.clientType) + return prioritylevelconfigurations.WithMetrics(c.inner.PriorityLevelConfigurations(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { + return flowschemas.WithTracing(c.inner.FlowSchemas(), c.client, "FlowSchema") +} +func (c *withTracing) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { + return prioritylevelconfigurations.WithTracing(c.inner.PriorityLevelConfigurations(), c.client, "PriorityLevelConfiguration") +} diff --git a/pkg/clients/kube/flowcontrolv1beta1/flowschemas/resource.generated.go b/pkg/clients/kube/flowcontrolv1beta1/flowschemas/resource.generated.go new file mode 100644 index 0000000000..ce01b01e8b --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1beta1/flowschemas/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_flowcontrol_v1beta1 "k8s.io/api/flowcontrol/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface, client, kind string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchemaList, error) { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchemaList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/flowcontrolv1beta1/prioritylevelconfigurations/resource.generated.go b/pkg/clients/kube/flowcontrolv1beta1/prioritylevelconfigurations/resource.generated.go new file mode 100644 index 0000000000..884a2377fb --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1beta1/prioritylevelconfigurations/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_flowcontrol_v1beta1 "k8s.io/api/flowcontrol/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/flowcontrolv1beta2/client.generated.go b/pkg/clients/kube/flowcontrolv1beta2/client.generated.go new file mode 100644 index 0000000000..145b92562f --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1beta2/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + flowschemas "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1beta2/flowschemas" + prioritylevelconfigurations "github.com/kyverno/kyverno/pkg/clients/kube/flowcontrolv1beta2/prioritylevelconfigurations" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface, client string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "FlowSchema", c.clientType) + return flowschemas.WithMetrics(c.inner.FlowSchemas(), recorder) +} +func (c *withMetrics) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityLevelConfiguration", c.clientType) + return prioritylevelconfigurations.WithMetrics(c.inner.PriorityLevelConfigurations(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { + return flowschemas.WithTracing(c.inner.FlowSchemas(), c.client, "FlowSchema") +} +func (c *withTracing) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { + return prioritylevelconfigurations.WithTracing(c.inner.PriorityLevelConfigurations(), c.client, "PriorityLevelConfiguration") +} diff --git a/pkg/clients/kube/flowcontrolv1beta2/flowschemas/resource.generated.go b/pkg/clients/kube/flowcontrolv1beta2/flowschemas/resource.generated.go new file mode 100644 index 0000000000..04317ae6fd --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1beta2/flowschemas/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_flowcontrol_v1beta2 "k8s.io/api/flowcontrol/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface, client, kind string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchemaList, error) { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchemaList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/flowcontrolv1beta2/prioritylevelconfigurations/resource.generated.go b/pkg/clients/kube/flowcontrolv1beta2/prioritylevelconfigurations/resource.generated.go new file mode 100644 index 0000000000..1a19e36874 --- /dev/null +++ b/pkg/clients/kube/flowcontrolv1beta2/prioritylevelconfigurations/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_flowcontrol_v1beta2 "k8s.io/api/flowcontrol/v1beta2" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" + k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface, client, kind string) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfigurationList, error) { + defer c.recorder.Record("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) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfigurationList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/interface.generated.go b/pkg/clients/kube/interface.generated.go new file mode 100644 index 0000000000..7df256c836 --- /dev/null +++ b/pkg/clients/kube/interface.generated.go @@ -0,0 +1,73 @@ +package clientset + +import ( + "net/http" + + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +type Interface interface { + k8s_io_client_go_kubernetes.Interface + WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface + WithTracing() Interface +} + +type wrapper struct { + k8s_io_client_go_kubernetes.Interface +} + +type NewOption func(Interface) Interface + +func NewForConfig(c *rest.Config, opts ...NewOption) (Interface, error) { + inner, err := k8s_io_client_go_kubernetes.NewForConfig(c) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client, opts ...NewOption) (Interface, error) { + inner, err := k8s_io_client_go_kubernetes.NewForConfigAndClient(c, httpClient) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigOrDie(c *rest.Config, opts ...NewOption) Interface { + return From(k8s_io_client_go_kubernetes.NewForConfigOrDie(c), opts...) +} + +func from(inner k8s_io_client_go_kubernetes.Interface, opts ...NewOption) Interface { + return &wrapper{inner} +} + +func From(inner k8s_io_client_go_kubernetes.Interface, opts ...NewOption) Interface { + i := from(inner) + for _, opt := range opts { + i = opt(i) + } + return i +} + +func (i *wrapper) WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface { + return from(WrapWithMetrics(i, m, t)) +} + +func WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) NewOption { + return func(i Interface) Interface { + return i.WithMetrics(m, t) + } +} + +func (i *wrapper) WithTracing() Interface { + return from(WrapWithTracing(i)) +} + +func WithTracing() NewOption { + return func(i Interface) Interface { + return i.WithTracing() + } +} diff --git a/pkg/clients/kube/internalv1alpha1/client.generated.go b/pkg/clients/kube/internalv1alpha1/client.generated.go new file mode 100644 index 0000000000..eebea50831 --- /dev/null +++ b/pkg/clients/kube/internalv1alpha1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + storageversions "github.com/kyverno/kyverno/pkg/clients/kube/internalv1alpha1/storageversions" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) StorageVersions() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "StorageVersion", c.clientType) + return storageversions.WithMetrics(c.inner.StorageVersions(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) StorageVersions() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { + return storageversions.WithTracing(c.inner.StorageVersions(), c.client, "StorageVersion") +} diff --git a/pkg/clients/kube/internalv1alpha1/storageversions/resource.generated.go b/pkg/clients/kube/internalv1alpha1/storageversions/resource.generated.go new file mode 100644 index 0000000000..78a49c8601 --- /dev/null +++ b/pkg/clients/kube/internalv1alpha1/storageversions/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_apiserverinternal_v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1" + k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface, client, kind string) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersionList, error) { + defer c.recorder.Record("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) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersionList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/networkingv1/client.generated.go b/pkg/clients/kube/networkingv1/client.generated.go new file mode 100644 index 0000000000..cde24f8ddf --- /dev/null +++ b/pkg/clients/kube/networkingv1/client.generated.go @@ -0,0 +1,58 @@ +package client + +import ( + ingressclasses "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1/ingressclasses" + ingresses "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1/ingresses" + networkpolicies "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1/networkpolicies" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface, client string) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "IngressClass", c.clientType) + return ingressclasses.WithMetrics(c.inner.IngressClasses(), recorder) +} +func (c *withMetrics) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Ingress", c.clientType) + return ingresses.WithMetrics(c.inner.Ingresses(namespace), recorder) +} +func (c *withMetrics) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "NetworkPolicy", c.clientType) + return networkpolicies.WithMetrics(c.inner.NetworkPolicies(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { + return ingressclasses.WithTracing(c.inner.IngressClasses(), c.client, "IngressClass") +} +func (c *withTracing) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { + return ingresses.WithTracing(c.inner.Ingresses(namespace), c.client, "Ingress") +} +func (c *withTracing) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { + return networkpolicies.WithTracing(c.inner.NetworkPolicies(namespace), c.client, "NetworkPolicy") +} diff --git a/pkg/clients/kube/networkingv1/ingressclasses/resource.generated.go b/pkg/clients/kube/networkingv1/ingressclasses/resource.generated.go new file mode 100644 index 0000000000..856e6b0653 --- /dev/null +++ b/pkg/clients/kube/networkingv1/ingressclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_networking_v1 "k8s.io/api/networking/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_networking_v1 "k8s.io/client-go/applyconfigurations/networking/v1" + k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1.IngressClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1.IngressClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_networking_v1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/networkingv1/ingresses/resource.generated.go b/pkg/clients/kube/networkingv1/ingresses/resource.generated.go new file mode 100644 index 0000000000..3364f9348d --- /dev/null +++ b/pkg/clients/kube/networkingv1/ingresses/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_networking_v1 "k8s.io/api/networking/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_networking_v1 "k8s.io/client-go/applyconfigurations/networking/v1" + k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface, client, kind string) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressList, error) { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/networkingv1/networkpolicies/resource.generated.go b/pkg/clients/kube/networkingv1/networkpolicies/resource.generated.go new file mode 100644 index 0000000000..2a8b6337e1 --- /dev/null +++ b/pkg/clients/kube/networkingv1/networkpolicies/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_networking_v1 "k8s.io/api/networking/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_networking_v1 "k8s.io/client-go/applyconfigurations/networking/v1" + k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface, client, kind string) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.NetworkPolicyList, error) { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.NetworkPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/networkingv1alpha1/client.generated.go b/pkg/clients/kube/networkingv1alpha1/client.generated.go new file mode 100644 index 0000000000..4bfac00b9d --- /dev/null +++ b/pkg/clients/kube/networkingv1alpha1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + clustercidrs "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1alpha1/clustercidrs" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_networking_v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ClusterCIDRs() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterCIDR", c.clientType) + return clustercidrs.WithMetrics(c.inner.ClusterCIDRs(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ClusterCIDRs() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { + return clustercidrs.WithTracing(c.inner.ClusterCIDRs(), c.client, "ClusterCIDR") +} diff --git a/pkg/clients/kube/networkingv1alpha1/clustercidrs/resource.generated.go b/pkg/clients/kube/networkingv1alpha1/clustercidrs/resource.generated.go new file mode 100644 index 0000000000..828d0c65e0 --- /dev/null +++ b/pkg/clients/kube/networkingv1alpha1/clustercidrs/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_networking_v1alpha1 "k8s.io/api/networking/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_networking_v1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" + k8s_io_client_go_kubernetes_typed_networking_v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface, client, kind string) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1alpha1.ClusterCIDRApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDRList, error) { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1alpha1.ClusterCIDRApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDRList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/networkingv1beta1/client.generated.go b/pkg/clients/kube/networkingv1beta1/client.generated.go new file mode 100644 index 0000000000..bcd91eb49b --- /dev/null +++ b/pkg/clients/kube/networkingv1beta1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + ingressclasses "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1beta1/ingressclasses" + ingresses "github.com/kyverno/kyverno/pkg/clients/kube/networkingv1beta1/ingresses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_networking_v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "IngressClass", c.clientType) + return ingressclasses.WithMetrics(c.inner.IngressClasses(), recorder) +} +func (c *withMetrics) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Ingress", c.clientType) + return ingresses.WithMetrics(c.inner.Ingresses(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { + return ingressclasses.WithTracing(c.inner.IngressClasses(), c.client, "IngressClass") +} +func (c *withTracing) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { + return ingresses.WithTracing(c.inner.Ingresses(namespace), c.client, "Ingress") +} diff --git a/pkg/clients/kube/networkingv1beta1/ingressclasses/resource.generated.go b/pkg/clients/kube/networkingv1beta1/ingressclasses/resource.generated.go new file mode 100644 index 0000000000..93e135b1c4 --- /dev/null +++ b/pkg/clients/kube/networkingv1beta1/ingressclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_networking_v1beta1 "k8s.io/api/networking/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_networking_v1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + k8s_io_client_go_kubernetes_typed_networking_v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/networkingv1beta1/ingresses/resource.generated.go b/pkg/clients/kube/networkingv1beta1/ingresses/resource.generated.go new file mode 100644 index 0000000000..0f89da5cb8 --- /dev/null +++ b/pkg/clients/kube/networkingv1beta1/ingresses/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_networking_v1beta1 "k8s.io/api/networking/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_networking_v1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + k8s_io_client_go_kubernetes_typed_networking_v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface, client, kind string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressList, error) { + defer c.recorder.Record("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) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/nodev1/client.generated.go b/pkg/clients/kube/nodev1/client.generated.go new file mode 100644 index 0000000000..8491a197f7 --- /dev/null +++ b/pkg/clients/kube/nodev1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + runtimeclasses "github.com/kyverno/kyverno/pkg/clients/kube/nodev1/runtimeclasses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_node_v1 "k8s.io/client-go/kubernetes/typed/node/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface, client string) k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "RuntimeClass", c.clientType) + return runtimeclasses.WithMetrics(c.inner.RuntimeClasses(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { + return runtimeclasses.WithTracing(c.inner.RuntimeClasses(), c.client, "RuntimeClass") +} diff --git a/pkg/clients/kube/nodev1/runtimeclasses/resource.generated.go b/pkg/clients/kube/nodev1/runtimeclasses/resource.generated.go new file mode 100644 index 0000000000..6545410653 --- /dev/null +++ b/pkg/clients/kube/nodev1/runtimeclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_node_v1 "k8s.io/api/node/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_node_v1 "k8s.io/client-go/applyconfigurations/node/v1" + k8s_io_client_go_kubernetes_typed_node_v1 "k8s.io/client-go/kubernetes/typed/node/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_node_v1.RuntimeClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1.RuntimeClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_node_v1.RuntimeClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1.RuntimeClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_node_v1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/nodev1alpha1/client.generated.go b/pkg/clients/kube/nodev1alpha1/client.generated.go new file mode 100644 index 0000000000..e63d29b3e5 --- /dev/null +++ b/pkg/clients/kube/nodev1alpha1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + runtimeclasses "github.com/kyverno/kyverno/pkg/clients/kube/nodev1alpha1/runtimeclasses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_node_v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "RuntimeClass", c.clientType) + return runtimeclasses.WithMetrics(c.inner.RuntimeClasses(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { + return runtimeclasses.WithTracing(c.inner.RuntimeClasses(), c.client, "RuntimeClass") +} diff --git a/pkg/clients/kube/nodev1alpha1/runtimeclasses/resource.generated.go b/pkg/clients/kube/nodev1alpha1/runtimeclasses/resource.generated.go new file mode 100644 index 0000000000..09398b0383 --- /dev/null +++ b/pkg/clients/kube/nodev1alpha1/runtimeclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_node_v1alpha1 "k8s.io/api/node/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_node_v1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" + k8s_io_client_go_kubernetes_typed_node_v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1alpha1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1alpha1.RuntimeClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1alpha1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1alpha1.RuntimeClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/nodev1beta1/client.generated.go b/pkg/clients/kube/nodev1beta1/client.generated.go new file mode 100644 index 0000000000..6865d5545c --- /dev/null +++ b/pkg/clients/kube/nodev1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + runtimeclasses "github.com/kyverno/kyverno/pkg/clients/kube/nodev1beta1/runtimeclasses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_node_v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "RuntimeClass", c.clientType) + return runtimeclasses.WithMetrics(c.inner.RuntimeClasses(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { + return runtimeclasses.WithTracing(c.inner.RuntimeClasses(), c.client, "RuntimeClass") +} diff --git a/pkg/clients/kube/nodev1beta1/runtimeclasses/resource.generated.go b/pkg/clients/kube/nodev1beta1/runtimeclasses/resource.generated.go new file mode 100644 index 0000000000..e61809f27b --- /dev/null +++ b/pkg/clients/kube/nodev1beta1/runtimeclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_node_v1beta1 "k8s.io/api/node/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_node_v1beta1 "k8s.io/client-go/applyconfigurations/node/v1beta1" + k8s_io_client_go_kubernetes_typed_node_v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1beta1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1beta1.RuntimeClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1beta1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1beta1.RuntimeClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/policyv1/client.generated.go b/pkg/clients/kube/policyv1/client.generated.go new file mode 100644 index 0000000000..00147b3d45 --- /dev/null +++ b/pkg/clients/kube/policyv1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + evictions "github.com/kyverno/kyverno/pkg/clients/kube/policyv1/evictions" + poddisruptionbudgets "github.com/kyverno/kyverno/pkg/clients/kube/policyv1/poddisruptionbudgets" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_policy_v1 "k8s.io/client-go/kubernetes/typed/policy/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface, client string) k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Eviction", c.clientType) + return evictions.WithMetrics(c.inner.Evictions(namespace), recorder) +} +func (c *withMetrics) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PodDisruptionBudget", c.clientType) + return poddisruptionbudgets.WithMetrics(c.inner.PodDisruptionBudgets(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { + return evictions.WithTracing(c.inner.Evictions(namespace), c.client, "Eviction") +} +func (c *withTracing) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { + return poddisruptionbudgets.WithTracing(c.inner.PodDisruptionBudgets(namespace), c.client, "PodDisruptionBudget") +} diff --git a/pkg/clients/kube/policyv1/evictions/resource.generated.go b/pkg/clients/kube/policyv1/evictions/resource.generated.go new file mode 100644 index 0000000000..291ccd86d8 --- /dev/null +++ b/pkg/clients/kube/policyv1/evictions/resource.generated.go @@ -0,0 +1,56 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_policy_v1 "k8s.io/api/policy/v1" + k8s_io_client_go_kubernetes_typed_policy_v1 "k8s.io/client-go/kubernetes/typed/policy/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface, client, kind string) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { + defer c.recorder.Record("evict") + return c.inner.Evict(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface + client string + kind string +} + +func (c *withTracing) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Evict"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Evict"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Evict(arg0, arg1) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} diff --git a/pkg/clients/kube/policyv1/poddisruptionbudgets/resource.generated.go b/pkg/clients/kube/policyv1/poddisruptionbudgets/resource.generated.go new file mode 100644 index 0000000000..8ca24f21ae --- /dev/null +++ b/pkg/clients/kube/policyv1/poddisruptionbudgets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_policy_v1 "k8s.io/api/policy/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_policy_v1 "k8s.io/client-go/applyconfigurations/policy/v1" + k8s_io_client_go_kubernetes_typed_policy_v1 "k8s.io/client-go/kubernetes/typed/policy/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1.PodDisruptionBudgetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1.PodDisruptionBudgetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/policyv1beta1/client.generated.go b/pkg/clients/kube/policyv1beta1/client.generated.go new file mode 100644 index 0000000000..3adde52788 --- /dev/null +++ b/pkg/clients/kube/policyv1beta1/client.generated.go @@ -0,0 +1,58 @@ +package client + +import ( + evictions "github.com/kyverno/kyverno/pkg/clients/kube/policyv1beta1/evictions" + poddisruptionbudgets "github.com/kyverno/kyverno/pkg/clients/kube/policyv1beta1/poddisruptionbudgets" + podsecuritypolicies "github.com/kyverno/kyverno/pkg/clients/kube/policyv1beta1/podsecuritypolicies" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Eviction", c.clientType) + return evictions.WithMetrics(c.inner.Evictions(namespace), recorder) +} +func (c *withMetrics) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PodDisruptionBudget", c.clientType) + return poddisruptionbudgets.WithMetrics(c.inner.PodDisruptionBudgets(namespace), recorder) +} +func (c *withMetrics) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PodSecurityPolicy", c.clientType) + return podsecuritypolicies.WithMetrics(c.inner.PodSecurityPolicies(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { + return evictions.WithTracing(c.inner.Evictions(namespace), c.client, "Eviction") +} +func (c *withTracing) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { + return poddisruptionbudgets.WithTracing(c.inner.PodDisruptionBudgets(namespace), c.client, "PodDisruptionBudget") +} +func (c *withTracing) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { + return podsecuritypolicies.WithTracing(c.inner.PodSecurityPolicies(), c.client, "PodSecurityPolicy") +} diff --git a/pkg/clients/kube/policyv1beta1/evictions/resource.generated.go b/pkg/clients/kube/policyv1beta1/evictions/resource.generated.go new file mode 100644 index 0000000000..fb0e6cb773 --- /dev/null +++ b/pkg/clients/kube/policyv1beta1/evictions/resource.generated.go @@ -0,0 +1,56 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_policy_v1beta1 "k8s.io/api/policy/v1beta1" + k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface, client, kind string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { + defer c.recorder.Record("evict") + return c.inner.Evict(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface + client string + kind string +} + +func (c *withTracing) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Evict"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Evict"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Evict(arg0, arg1) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} diff --git a/pkg/clients/kube/policyv1beta1/poddisruptionbudgets/resource.generated.go b/pkg/clients/kube/policyv1beta1/poddisruptionbudgets/resource.generated.go new file mode 100644 index 0000000000..a5011a0cc5 --- /dev/null +++ b/pkg/clients/kube/policyv1beta1/poddisruptionbudgets/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_policy_v1beta1 "k8s.io/api/policy/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_policy_v1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" + k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface, client, kind string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudgetList, error) { + defer c.recorder.Record("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) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudgetList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/policyv1beta1/podsecuritypolicies/resource.generated.go b/pkg/clients/kube/policyv1beta1/podsecuritypolicies/resource.generated.go new file mode 100644 index 0000000000..13721e4f36 --- /dev/null +++ b/pkg/clients/kube/policyv1beta1/podsecuritypolicies/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_policy_v1beta1 "k8s.io/api/policy/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_policy_v1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" + k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface, client, kind string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicyList, error) { + defer c.recorder.Record("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) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1/client.generated.go b/pkg/clients/kube/rbacv1/client.generated.go new file mode 100644 index 0000000000..e5f5761935 --- /dev/null +++ b/pkg/clients/kube/rbacv1/client.generated.go @@ -0,0 +1,66 @@ +package client + +import ( + clusterrolebindings "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1/clusterrolebindings" + clusterroles "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1/clusterroles" + rolebindings "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1/rolebindings" + roles "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1/roles" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface, client string) k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRoleBinding", c.clientType) + return clusterrolebindings.WithMetrics(c.inner.ClusterRoleBindings(), recorder) +} +func (c *withMetrics) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRole", c.clientType) + return clusterroles.WithMetrics(c.inner.ClusterRoles(), recorder) +} +func (c *withMetrics) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "RoleBinding", c.clientType) + return rolebindings.WithMetrics(c.inner.RoleBindings(namespace), recorder) +} +func (c *withMetrics) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Role", c.clientType) + return roles.WithMetrics(c.inner.Roles(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { + return clusterrolebindings.WithTracing(c.inner.ClusterRoleBindings(), c.client, "ClusterRoleBinding") +} +func (c *withTracing) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { + return clusterroles.WithTracing(c.inner.ClusterRoles(), c.client, "ClusterRole") +} +func (c *withTracing) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { + return rolebindings.WithTracing(c.inner.RoleBindings(namespace), c.client, "RoleBinding") +} +func (c *withTracing) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { + return roles.WithTracing(c.inner.Roles(namespace), c.client, "Role") +} diff --git a/pkg/clients/kube/rbacv1/clusterrolebindings/resource.generated.go b/pkg/clients/kube/rbacv1/clusterrolebindings/resource.generated.go new file mode 100644 index 0000000000..73e7535161 --- /dev/null +++ b/pkg/clients/kube/rbacv1/clusterrolebindings/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1 "k8s.io/api/rbac/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1 "k8s.io/client-go/applyconfigurations/rbac/v1" + k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleBindingList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleBindingList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1/clusterroles/resource.generated.go b/pkg/clients/kube/rbacv1/clusterroles/resource.generated.go new file mode 100644 index 0000000000..edd4058c20 --- /dev/null +++ b/pkg/clients/kube/rbacv1/clusterroles/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1 "k8s.io/api/rbac/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1 "k8s.io/client-go/applyconfigurations/rbac/v1" + k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.ClusterRole, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.ClusterRole, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1/rolebindings/resource.generated.go b/pkg/clients/kube/rbacv1/rolebindings/resource.generated.go new file mode 100644 index 0000000000..691be38d1f --- /dev/null +++ b/pkg/clients/kube/rbacv1/rolebindings/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1 "k8s.io/api/rbac/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1 "k8s.io/client-go/applyconfigurations/rbac/v1" + k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.RoleBinding, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleBindingList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.RoleBinding, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleBindingList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1/roles/resource.generated.go b/pkg/clients/kube/rbacv1/roles/resource.generated.go new file mode 100644 index 0000000000..79c90455ae --- /dev/null +++ b/pkg/clients/kube/rbacv1/roles/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1 "k8s.io/api/rbac/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1 "k8s.io/client-go/applyconfigurations/rbac/v1" + k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.Role, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.Role, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.Role, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1.Role, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.Role, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1alpha1/client.generated.go b/pkg/clients/kube/rbacv1alpha1/client.generated.go new file mode 100644 index 0000000000..e85d4cf7c3 --- /dev/null +++ b/pkg/clients/kube/rbacv1alpha1/client.generated.go @@ -0,0 +1,66 @@ +package client + +import ( + clusterrolebindings "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1alpha1/clusterrolebindings" + clusterroles "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1alpha1/clusterroles" + rolebindings "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1alpha1/rolebindings" + roles "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1alpha1/roles" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRoleBinding", c.clientType) + return clusterrolebindings.WithMetrics(c.inner.ClusterRoleBindings(), recorder) +} +func (c *withMetrics) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRole", c.clientType) + return clusterroles.WithMetrics(c.inner.ClusterRoles(), recorder) +} +func (c *withMetrics) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "RoleBinding", c.clientType) + return rolebindings.WithMetrics(c.inner.RoleBindings(namespace), recorder) +} +func (c *withMetrics) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Role", c.clientType) + return roles.WithMetrics(c.inner.Roles(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { + return clusterrolebindings.WithTracing(c.inner.ClusterRoleBindings(), c.client, "ClusterRoleBinding") +} +func (c *withTracing) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { + return clusterroles.WithTracing(c.inner.ClusterRoles(), c.client, "ClusterRole") +} +func (c *withTracing) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { + return rolebindings.WithTracing(c.inner.RoleBindings(namespace), c.client, "RoleBinding") +} +func (c *withTracing) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { + return roles.WithTracing(c.inner.Roles(namespace), c.client, "Role") +} diff --git a/pkg/clients/kube/rbacv1alpha1/clusterrolebindings/resource.generated.go b/pkg/clients/kube/rbacv1alpha1/clusterrolebindings/resource.generated.go new file mode 100644 index 0000000000..895882d425 --- /dev/null +++ b/pkg/clients/kube/rbacv1alpha1/clusterrolebindings/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBindingList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBindingList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1alpha1/clusterroles/resource.generated.go b/pkg/clients/kube/rbacv1alpha1/clusterroles/resource.generated.go new file mode 100644 index 0000000000..6d8e1cd90d --- /dev/null +++ b/pkg/clients/kube/rbacv1alpha1/clusterroles/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1alpha1/rolebindings/resource.generated.go b/pkg/clients/kube/rbacv1alpha1/rolebindings/resource.generated.go new file mode 100644 index 0000000000..bc39743bc7 --- /dev/null +++ b/pkg/clients/kube/rbacv1alpha1/rolebindings/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleBindingList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleBindingList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1alpha1/roles/resource.generated.go b/pkg/clients/kube/rbacv1alpha1/roles/resource.generated.go new file mode 100644 index 0000000000..82291650ec --- /dev/null +++ b/pkg/clients/kube/rbacv1alpha1/roles/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.Role, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1alpha1.Role, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1alpha1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1beta1/client.generated.go b/pkg/clients/kube/rbacv1beta1/client.generated.go new file mode 100644 index 0000000000..e8a2716478 --- /dev/null +++ b/pkg/clients/kube/rbacv1beta1/client.generated.go @@ -0,0 +1,66 @@ +package client + +import ( + clusterrolebindings "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1beta1/clusterrolebindings" + clusterroles "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1beta1/clusterroles" + rolebindings "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1beta1/rolebindings" + roles "github.com/kyverno/kyverno/pkg/clients/kube/rbacv1beta1/roles" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRoleBinding", c.clientType) + return clusterrolebindings.WithMetrics(c.inner.ClusterRoleBindings(), recorder) +} +func (c *withMetrics) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRole", c.clientType) + return clusterroles.WithMetrics(c.inner.ClusterRoles(), recorder) +} +func (c *withMetrics) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "RoleBinding", c.clientType) + return rolebindings.WithMetrics(c.inner.RoleBindings(namespace), recorder) +} +func (c *withMetrics) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Role", c.clientType) + return roles.WithMetrics(c.inner.Roles(namespace), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { + return clusterrolebindings.WithTracing(c.inner.ClusterRoleBindings(), c.client, "ClusterRoleBinding") +} +func (c *withTracing) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { + return clusterroles.WithTracing(c.inner.ClusterRoles(), c.client, "ClusterRole") +} +func (c *withTracing) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { + return rolebindings.WithTracing(c.inner.RoleBindings(namespace), c.client, "RoleBinding") +} +func (c *withTracing) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { + return roles.WithTracing(c.inner.Roles(namespace), c.client, "Role") +} diff --git a/pkg/clients/kube/rbacv1beta1/clusterrolebindings/resource.generated.go b/pkg/clients/kube/rbacv1beta1/clusterrolebindings/resource.generated.go new file mode 100644 index 0000000000..0b787be3a7 --- /dev/null +++ b/pkg/clients/kube/rbacv1beta1/clusterrolebindings/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBindingList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBindingList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1beta1/clusterroles/resource.generated.go b/pkg/clients/kube/rbacv1beta1/clusterroles/resource.generated.go new file mode 100644 index 0000000000..b215c0e26c --- /dev/null +++ b/pkg/clients/kube/rbacv1beta1/clusterroles/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1beta1/rolebindings/resource.generated.go b/pkg/clients/kube/rbacv1beta1/rolebindings/resource.generated.go new file mode 100644 index 0000000000..905c123416 --- /dev/null +++ b/pkg/clients/kube/rbacv1beta1/rolebindings/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleBindingList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleBindingList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/rbacv1beta1/roles/resource.generated.go b/pkg/clients/kube/rbacv1beta1/roles/resource.generated.go new file mode 100644 index 0000000000..d0257a88a4 --- /dev/null +++ b/pkg/clients/kube/rbacv1beta1/roles/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_rbac_v1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface, client, kind string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.Role, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleList, error) { + defer c.recorder.Record("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) (*k8s_io_api_rbac_v1beta1.Role, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_rbac_v1beta1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/schedulingv1/client.generated.go b/pkg/clients/kube/schedulingv1/client.generated.go new file mode 100644 index 0000000000..02ce069ee5 --- /dev/null +++ b/pkg/clients/kube/schedulingv1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + priorityclasses "github.com/kyverno/kyverno/pkg/clients/kube/schedulingv1/priorityclasses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_scheduling_v1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface, client string) k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityClass", c.clientType) + return priorityclasses.WithMetrics(c.inner.PriorityClasses(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { + return priorityclasses.WithTracing(c.inner.PriorityClasses(), c.client, "PriorityClass") +} diff --git a/pkg/clients/kube/schedulingv1/priorityclasses/resource.generated.go b/pkg/clients/kube/schedulingv1/priorityclasses/resource.generated.go new file mode 100644 index 0000000000..f0cbacbbea --- /dev/null +++ b/pkg/clients/kube/schedulingv1/priorityclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_scheduling_v1 "k8s.io/api/scheduling/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_scheduling_v1 "k8s.io/client-go/applyconfigurations/scheduling/v1" + k8s_io_client_go_kubernetes_typed_scheduling_v1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1.PriorityClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1.PriorityClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/schedulingv1alpha1/client.generated.go b/pkg/clients/kube/schedulingv1alpha1/client.generated.go new file mode 100644 index 0000000000..af7ff4832f --- /dev/null +++ b/pkg/clients/kube/schedulingv1alpha1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + priorityclasses "github.com/kyverno/kyverno/pkg/clients/kube/schedulingv1alpha1/priorityclasses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityClass", c.clientType) + return priorityclasses.WithMetrics(c.inner.PriorityClasses(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { + return priorityclasses.WithTracing(c.inner.PriorityClasses(), c.client, "PriorityClass") +} diff --git a/pkg/clients/kube/schedulingv1alpha1/priorityclasses/resource.generated.go b/pkg/clients/kube/schedulingv1alpha1/priorityclasses/resource.generated.go new file mode 100644 index 0000000000..35ed1176a6 --- /dev/null +++ b/pkg/clients/kube/schedulingv1alpha1/priorityclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_scheduling_v1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" + k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1alpha1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1alpha1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/schedulingv1beta1/client.generated.go b/pkg/clients/kube/schedulingv1beta1/client.generated.go new file mode 100644 index 0000000000..c0b22dce31 --- /dev/null +++ b/pkg/clients/kube/schedulingv1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + priorityclasses "github.com/kyverno/kyverno/pkg/clients/kube/schedulingv1beta1/priorityclasses" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_scheduling_v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityClass", c.clientType) + return priorityclasses.WithMetrics(c.inner.PriorityClasses(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { + return priorityclasses.WithTracing(c.inner.PriorityClasses(), c.client, "PriorityClass") +} diff --git a/pkg/clients/kube/schedulingv1beta1/priorityclasses/resource.generated.go b/pkg/clients/kube/schedulingv1beta1/priorityclasses/resource.generated.go new file mode 100644 index 0000000000..305adeb945 --- /dev/null +++ b/pkg/clients/kube/schedulingv1beta1/priorityclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_scheduling_v1beta1 "k8s.io/api/scheduling/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_scheduling_v1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" + k8s_io_client_go_kubernetes_typed_scheduling_v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1beta1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1beta1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1/client.generated.go b/pkg/clients/kube/storagev1/client.generated.go new file mode 100644 index 0000000000..ee9bda5c82 --- /dev/null +++ b/pkg/clients/kube/storagev1/client.generated.go @@ -0,0 +1,74 @@ +package client + +import ( + csidrivers "github.com/kyverno/kyverno/pkg/clients/kube/storagev1/csidrivers" + csinodes "github.com/kyverno/kyverno/pkg/clients/kube/storagev1/csinodes" + csistoragecapacities "github.com/kyverno/kyverno/pkg/clients/kube/storagev1/csistoragecapacities" + storageclasses "github.com/kyverno/kyverno/pkg/clients/kube/storagev1/storageclasses" + volumeattachments "github.com/kyverno/kyverno/pkg/clients/kube/storagev1/volumeattachments" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface, client string) k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "CSIDriver", c.clientType) + return csidrivers.WithMetrics(c.inner.CSIDrivers(), recorder) +} +func (c *withMetrics) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "CSINode", c.clientType) + return csinodes.WithMetrics(c.inner.CSINodes(), recorder) +} +func (c *withMetrics) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CSIStorageCapacity", c.clientType) + return csistoragecapacities.WithMetrics(c.inner.CSIStorageCapacities(namespace), recorder) +} +func (c *withMetrics) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "StorageClass", c.clientType) + return storageclasses.WithMetrics(c.inner.StorageClasses(), recorder) +} +func (c *withMetrics) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "VolumeAttachment", c.clientType) + return volumeattachments.WithMetrics(c.inner.VolumeAttachments(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { + return csidrivers.WithTracing(c.inner.CSIDrivers(), c.client, "CSIDriver") +} +func (c *withTracing) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { + return csinodes.WithTracing(c.inner.CSINodes(), c.client, "CSINode") +} +func (c *withTracing) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { + return csistoragecapacities.WithTracing(c.inner.CSIStorageCapacities(namespace), c.client, "CSIStorageCapacity") +} +func (c *withTracing) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { + return storageclasses.WithTracing(c.inner.StorageClasses(), c.client, "StorageClass") +} +func (c *withTracing) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { + return volumeattachments.WithTracing(c.inner.VolumeAttachments(), c.client, "VolumeAttachment") +} diff --git a/pkg/clients/kube/storagev1/csidrivers/resource.generated.go b/pkg/clients/kube/storagev1/csidrivers/resource.generated.go new file mode 100644 index 0000000000..87de06277c --- /dev/null +++ b/pkg/clients/kube/storagev1/csidrivers/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1 "k8s.io/api/storage/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.CSIDriver, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIDriverList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.CSIDriver, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIDriverList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1/csinodes/resource.generated.go b/pkg/clients/kube/storagev1/csinodes/resource.generated.go new file mode 100644 index 0000000000..7ad2882713 --- /dev/null +++ b/pkg/clients/kube/storagev1/csinodes/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1 "k8s.io/api/storage/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSINode, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSINode, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.CSINode, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSINodeList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.CSINode, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSINode, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSINodeList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1/csistoragecapacities/resource.generated.go b/pkg/clients/kube/storagev1/csistoragecapacities/resource.generated.go new file mode 100644 index 0000000000..09891515ac --- /dev/null +++ b/pkg/clients/kube/storagev1/csistoragecapacities/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1 "k8s.io/api/storage/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIStorageCapacityList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIStorageCapacityList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1/storageclasses/resource.generated.go b/pkg/clients/kube/storagev1/storageclasses/resource.generated.go new file mode 100644 index 0000000000..e23fc799bf --- /dev/null +++ b/pkg/clients/kube/storagev1/storageclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1 "k8s.io/api/storage/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.StorageClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.StorageClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.StorageClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.StorageClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1/volumeattachments/resource.generated.go b/pkg/clients/kube/storagev1/volumeattachments/resource.generated.go new file mode 100644 index 0000000000..747baee4a6 --- /dev/null +++ b/pkg/clients/kube/storagev1/volumeattachments/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1 "k8s.io/api/storage/v1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" + k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.VolumeAttachmentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.VolumeAttachmentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1alpha1/client.generated.go b/pkg/clients/kube/storagev1alpha1/client.generated.go new file mode 100644 index 0000000000..c673d4fb1d --- /dev/null +++ b/pkg/clients/kube/storagev1alpha1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + csistoragecapacities "github.com/kyverno/kyverno/pkg/clients/kube/storagev1alpha1/csistoragecapacities" + volumeattachments "github.com/kyverno/kyverno/pkg/clients/kube/storagev1alpha1/volumeattachments" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_storage_v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CSIStorageCapacity", c.clientType) + return csistoragecapacities.WithMetrics(c.inner.CSIStorageCapacities(namespace), recorder) +} +func (c *withMetrics) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "VolumeAttachment", c.clientType) + return volumeattachments.WithMetrics(c.inner.VolumeAttachments(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { + return csistoragecapacities.WithTracing(c.inner.CSIStorageCapacities(namespace), c.client, "CSIStorageCapacity") +} +func (c *withTracing) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { + return volumeattachments.WithTracing(c.inner.VolumeAttachments(), c.client, "VolumeAttachment") +} diff --git a/pkg/clients/kube/storagev1alpha1/csistoragecapacities/resource.generated.go b/pkg/clients/kube/storagev1alpha1/csistoragecapacities/resource.generated.go new file mode 100644 index 0000000000..cb7dbdc2f1 --- /dev/null +++ b/pkg/clients/kube/storagev1alpha1/csistoragecapacities/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1alpha1 "k8s.io/api/storage/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" + k8s_io_client_go_kubernetes_typed_storage_v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacityList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacityList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1alpha1/volumeattachments/resource.generated.go b/pkg/clients/kube/storagev1alpha1/volumeattachments/resource.generated.go new file mode 100644 index 0000000000..59fa5e51c4 --- /dev/null +++ b/pkg/clients/kube/storagev1alpha1/volumeattachments/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1alpha1 "k8s.io/api/storage/v1alpha1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" + k8s_io_client_go_kubernetes_typed_storage_v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachmentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachmentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1beta1/client.generated.go b/pkg/clients/kube/storagev1beta1/client.generated.go new file mode 100644 index 0000000000..c92a3b79ea --- /dev/null +++ b/pkg/clients/kube/storagev1beta1/client.generated.go @@ -0,0 +1,74 @@ +package client + +import ( + csidrivers "github.com/kyverno/kyverno/pkg/clients/kube/storagev1beta1/csidrivers" + csinodes "github.com/kyverno/kyverno/pkg/clients/kube/storagev1beta1/csinodes" + csistoragecapacities "github.com/kyverno/kyverno/pkg/clients/kube/storagev1beta1/csistoragecapacities" + storageclasses "github.com/kyverno/kyverno/pkg/clients/kube/storagev1beta1/storageclasses" + volumeattachments "github.com/kyverno/kyverno/pkg/clients/kube/storagev1beta1/volumeattachments" + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface, client string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "CSIDriver", c.clientType) + return csidrivers.WithMetrics(c.inner.CSIDrivers(), recorder) +} +func (c *withMetrics) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "CSINode", c.clientType) + return csinodes.WithMetrics(c.inner.CSINodes(), recorder) +} +func (c *withMetrics) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CSIStorageCapacity", c.clientType) + return csistoragecapacities.WithMetrics(c.inner.CSIStorageCapacities(namespace), recorder) +} +func (c *withMetrics) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "StorageClass", c.clientType) + return storageclasses.WithMetrics(c.inner.StorageClasses(), recorder) +} +func (c *withMetrics) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "VolumeAttachment", c.clientType) + return volumeattachments.WithMetrics(c.inner.VolumeAttachments(), recorder) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { + return csidrivers.WithTracing(c.inner.CSIDrivers(), c.client, "CSIDriver") +} +func (c *withTracing) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { + return csinodes.WithTracing(c.inner.CSINodes(), c.client, "CSINode") +} +func (c *withTracing) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { + return csistoragecapacities.WithTracing(c.inner.CSIStorageCapacities(namespace), c.client, "CSIStorageCapacity") +} +func (c *withTracing) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { + return storageclasses.WithTracing(c.inner.StorageClasses(), c.client, "StorageClass") +} +func (c *withTracing) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { + return volumeattachments.WithTracing(c.inner.VolumeAttachments(), c.client, "VolumeAttachment") +} diff --git a/pkg/clients/kube/storagev1beta1/csidrivers/resource.generated.go b/pkg/clients/kube/storagev1beta1/csidrivers/resource.generated.go new file mode 100644 index 0000000000..1a490f6552 --- /dev/null +++ b/pkg/clients/kube/storagev1beta1/csidrivers/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIDriverList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIDriverList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1beta1/csinodes/resource.generated.go b/pkg/clients/kube/storagev1beta1/csinodes/resource.generated.go new file mode 100644 index 0000000000..cc93b67b52 --- /dev/null +++ b/pkg/clients/kube/storagev1beta1/csinodes/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.CSINode, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSINodeList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.CSINode, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSINodeList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1beta1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1beta1/csistoragecapacities/resource.generated.go b/pkg/clients/kube/storagev1beta1/csistoragecapacities/resource.generated.go new file mode 100644 index 0000000000..d5b8e5f4e2 --- /dev/null +++ b/pkg/clients/kube/storagev1beta1/csistoragecapacities/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacityList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacityList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1beta1/storageclasses/resource.generated.go b/pkg/clients/kube/storagev1beta1/storageclasses/resource.generated.go new file mode 100644 index 0000000000..a313d168d9 --- /dev/null +++ b/pkg/clients/kube/storagev1beta1/storageclasses/resource.generated.go @@ -0,0 +1,236 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.StorageClassList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.StorageClassList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kube/storagev1beta1/volumeattachments/resource.generated.go b/pkg/clients/kube/storagev1beta1/volumeattachments/resource.generated.go new file mode 100644 index 0000000000..8f86438d1e --- /dev/null +++ b/pkg/clients/kube/storagev1beta1/volumeattachments/resource.generated.go @@ -0,0 +1,280 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" +) + +func WithMetrics(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface, recorder metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface, client, kind string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("apply") + return c.inner.Apply(arg0, arg1, arg2) +} +func (c *withMetrics) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("apply_status") + return c.inner.ApplyStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachmentList, error) { + defer c.recorder.Record("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) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface + client string + kind string +} + +func (c *withTracing) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Apply"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Apply"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "ApplyStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "ApplyStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachmentList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/clientset.generated.go b/pkg/clients/kyverno/clientset.generated.go index 818b32ddd6..cc365a7322 100644 --- a/pkg/clients/kyverno/clientset.generated.go +++ b/pkg/clients/kyverno/clientset.generated.go @@ -1,79 +1,67 @@ -package client +package clientset import ( - net_http "net/http" - github_com_kyverno_kyverno_pkg_client_clientset_versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" - github_com_kyverno_kyverno_pkg_clients_middleware_metrics_kyverno "github.com/kyverno/kyverno/pkg/clients/middleware/metrics/kyverno" - github_com_kyverno_kyverno_pkg_clients_middleware_tracing_kyverno "github.com/kyverno/kyverno/pkg/clients/middleware/tracing/kyverno" - github_com_kyverno_kyverno_pkg_metrics "github.com/kyverno/kyverno/pkg/metrics" - k8s_io_client_go_rest "k8s.io/client-go/rest" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1beta1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/policyreport/v1alpha2" + kyvernov1 "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1" + kyvernov1alpha1 "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha1" + kyvernov1alpha2 "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha2" + kyvernov1beta1 "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1beta1" + wgpolicyk8sv1alpha2 "github.com/kyverno/kyverno/pkg/clients/kyverno/wgpolicyk8sv1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/discovery" ) -type Interface interface { - github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface - WithMetrics(m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) Interface - WithTracing() Interface +type clientset struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface + kyvernov1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface + kyvernov1alpha1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface + kyvernov1alpha2 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface + kyvernov1beta1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface + wgpolicyk8sv1alpha2 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface } -type wrapper struct { - github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface +func (c *clientset) Discovery() discovery.DiscoveryInterface { + return c.inner.Discovery() +} +func (c *clientset) KyvernoV1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { + return c.kyvernov1 +} +func (c *clientset) KyvernoV1alpha1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { + return c.kyvernov1alpha1 +} +func (c *clientset) KyvernoV1alpha2() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { + return c.kyvernov1alpha2 +} +func (c *clientset) KyvernoV1beta1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { + return c.kyvernov1beta1 +} +func (c *clientset) Wgpolicyk8sV1alpha2() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { + return c.wgpolicyk8sv1alpha2 } -type NewOption func(Interface) Interface - -func NewForConfig(c *k8s_io_client_go_rest.Config, opts ...NewOption) (Interface, error) { - inner, err := github_com_kyverno_kyverno_pkg_client_clientset_versioned.NewForConfig(c) - if err != nil { - return nil, err - } - return From(inner, opts...), nil -} - -func NewForConfigAndClient(c *k8s_io_client_go_rest.Config, httpClient *net_http.Client, opts ...NewOption) (Interface, error) { - inner, err := github_com_kyverno_kyverno_pkg_client_clientset_versioned.NewForConfigAndClient(c, httpClient) - if err != nil { - return nil, err - } - return From(inner, opts...), nil -} - -func NewForConfigOrDie(c *k8s_io_client_go_rest.Config, opts ...NewOption) Interface { - return From(github_com_kyverno_kyverno_pkg_client_clientset_versioned.NewForConfigOrDie(c), opts...) -} - -func New(c k8s_io_client_go_rest.Interface, opts ...NewOption) Interface { - return From(github_com_kyverno_kyverno_pkg_client_clientset_versioned.New(c), opts...) -} - -func from(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface, opts ...NewOption) Interface { - return &wrapper{inner} -} - -func From(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface, opts ...NewOption) Interface { - i := from(inner) - for _, opt := range opts { - i = opt(i) - } - return i -} - -func (i *wrapper) WithMetrics(m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) Interface { - return from(github_com_kyverno_kyverno_pkg_clients_middleware_metrics_kyverno.Wrap(i, m, t)) -} - -func WithMetrics(m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) NewOption { - return func(i Interface) Interface { - return i.WithMetrics(m, t) +func WrapWithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface { + return &clientset{ + inner: inner, + kyvernov1: kyvernov1.WithMetrics(inner.KyvernoV1(), metrics, clientType), + kyvernov1alpha1: kyvernov1alpha1.WithMetrics(inner.KyvernoV1alpha1(), metrics, clientType), + kyvernov1alpha2: kyvernov1alpha2.WithMetrics(inner.KyvernoV1alpha2(), metrics, clientType), + kyvernov1beta1: kyvernov1beta1.WithMetrics(inner.KyvernoV1beta1(), metrics, clientType), + wgpolicyk8sv1alpha2: wgpolicyk8sv1alpha2.WithMetrics(inner.Wgpolicyk8sV1alpha2(), metrics, clientType), } } -func (i *wrapper) WithTracing() Interface { - return from(github_com_kyverno_kyverno_pkg_clients_middleware_tracing_kyverno.Wrap(i)) -} - -func WithTracing() NewOption { - return func(i Interface) Interface { - return i.WithTracing() +func WrapWithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface { + return &clientset{ + inner: inner, + kyvernov1: kyvernov1.WithTracing(inner.KyvernoV1(), "KyvernoV1"), + kyvernov1alpha1: kyvernov1alpha1.WithTracing(inner.KyvernoV1alpha1(), "KyvernoV1alpha1"), + kyvernov1alpha2: kyvernov1alpha2.WithTracing(inner.KyvernoV1alpha2(), "KyvernoV1alpha2"), + kyvernov1beta1: kyvernov1beta1.WithTracing(inner.KyvernoV1beta1(), "KyvernoV1beta1"), + wgpolicyk8sv1alpha2: wgpolicyk8sv1alpha2.WithTracing(inner.Wgpolicyk8sV1alpha2(), "Wgpolicyk8sV1alpha2"), } } diff --git a/pkg/clients/kyverno/interface.generated.go b/pkg/clients/kyverno/interface.generated.go new file mode 100644 index 0000000000..bc276cf49c --- /dev/null +++ b/pkg/clients/kyverno/interface.generated.go @@ -0,0 +1,73 @@ +package clientset + +import ( + "net/http" + + github_com_kyverno_kyverno_pkg_client_clientset_versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/rest" +) + +type Interface interface { + github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface + WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface + WithTracing() Interface +} + +type wrapper struct { + github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface +} + +type NewOption func(Interface) Interface + +func NewForConfig(c *rest.Config, opts ...NewOption) (Interface, error) { + inner, err := github_com_kyverno_kyverno_pkg_client_clientset_versioned.NewForConfig(c) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client, opts ...NewOption) (Interface, error) { + inner, err := github_com_kyverno_kyverno_pkg_client_clientset_versioned.NewForConfigAndClient(c, httpClient) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigOrDie(c *rest.Config, opts ...NewOption) Interface { + return From(github_com_kyverno_kyverno_pkg_client_clientset_versioned.NewForConfigOrDie(c), opts...) +} + +func from(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface, opts ...NewOption) Interface { + return &wrapper{inner} +} + +func From(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface, opts ...NewOption) Interface { + i := from(inner) + for _, opt := range opts { + i = opt(i) + } + return i +} + +func (i *wrapper) WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface { + return from(WrapWithMetrics(i, m, t)) +} + +func WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) NewOption { + return func(i Interface) Interface { + return i.WithMetrics(m, t) + } +} + +func (i *wrapper) WithTracing() Interface { + return from(WrapWithTracing(i)) +} + +func WithTracing() NewOption { + return func(i Interface) Interface { + return i.WithTracing() + } +} diff --git a/pkg/clients/kyverno/kyvernov1/client.generated.go b/pkg/clients/kyverno/kyvernov1/client.generated.go new file mode 100644 index 0000000000..503fc1aa14 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1/client.generated.go @@ -0,0 +1,58 @@ +package client + +import ( + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" + clusterpolicies "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1/clusterpolicies" + generaterequests "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1/generaterequests" + policies "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1/policies" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface, client string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ClusterPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterPolicy", c.clientType) + return clusterpolicies.WithMetrics(c.inner.ClusterPolicies(), recorder) +} +func (c *withMetrics) GenerateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "GenerateRequest", c.clientType) + return generaterequests.WithMetrics(c.inner.GenerateRequests(namespace), recorder) +} +func (c *withMetrics) Policies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Policy", c.clientType) + return policies.WithMetrics(c.inner.Policies(namespace), recorder) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ClusterPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { + return clusterpolicies.WithTracing(c.inner.ClusterPolicies(), c.client, "ClusterPolicy") +} +func (c *withTracing) GenerateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { + return generaterequests.WithTracing(c.inner.GenerateRequests(namespace), c.client, "GenerateRequest") +} +func (c *withTracing) Policies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { + return policies.WithTracing(c.inner.Policies(namespace), c.client, "Policy") +} diff --git a/pkg/clients/kyverno/kyvernov1/clusterpolicies/resource.generated.go b/pkg/clients/kyverno/kyvernov1/clusterpolicies/resource.generated.go new file mode 100644 index 0000000000..686b3fdd65 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1/clusterpolicies/resource.generated.go @@ -0,0 +1,235 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1 "github.com/kyverno/kyverno/api/kyverno/v1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1.ClusterPolicy, error) { + defer c.recorder.Record("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_v1.ClusterPolicyList, error) { + defer c.recorder.Record("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_v1.ClusterPolicy, error) { + defer c.recorder.Record("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_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1.ClusterPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1.ClusterPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1.ClusterPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1/generaterequests/resource.generated.go b/pkg/clients/kyverno/kyvernov1/generaterequests/resource.generated.go new file mode 100644 index 0000000000..9d32b6b5e3 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1/generaterequests/resource.generated.go @@ -0,0 +1,235 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1 "github.com/kyverno/kyverno/api/kyverno/v1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1.GenerateRequest, error) { + defer c.recorder.Record("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_v1.GenerateRequestList, error) { + defer c.recorder.Record("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_v1.GenerateRequest, error) { + defer c.recorder.Record("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_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1.GenerateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1.GenerateRequestList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1.GenerateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1/policies/resource.generated.go b/pkg/clients/kyverno/kyvernov1/policies/resource.generated.go new file mode 100644 index 0000000000..7cf971dc7f --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1/policies/resource.generated.go @@ -0,0 +1,235 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1 "github.com/kyverno/kyverno/api/kyverno/v1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1.Policy, error) { + defer c.recorder.Record("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_v1.PolicyList, error) { + defer c.recorder.Record("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_v1.Policy, error) { + defer c.recorder.Record("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_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1.Policy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1.PolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1.Policy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1alpha1/cleanuppolicies/resource.generated.go b/pkg/clients/kyverno/kyvernov1alpha1/cleanuppolicies/resource.generated.go new file mode 100644 index 0000000000..89c0e98cfb --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha1/cleanuppolicies/resource.generated.go @@ -0,0 +1,235 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1alpha1 "github.com/kyverno/kyverno/api/kyverno/v1alpha1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha1" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1alpha1.CleanupPolicy, error) { + defer c.recorder.Record("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_v1alpha1.CleanupPolicyList, error) { + defer c.recorder.Record("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_v1alpha1.CleanupPolicy, error) { + defer c.recorder.Record("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_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1alpha1.CleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha1.CleanupPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha1.CleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1alpha1/client.generated.go b/pkg/clients/kyverno/kyvernov1alpha1/client.generated.go new file mode 100644 index 0000000000..1f84b386cf --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha1/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha1" + cleanuppolicies "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha1/cleanuppolicies" + clustercleanuppolicies "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha1/clustercleanuppolicies" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface, client string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) CleanupPolicies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CleanupPolicy", c.clientType) + return cleanuppolicies.WithMetrics(c.inner.CleanupPolicies(namespace), recorder) +} +func (c *withMetrics) ClusterCleanupPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterCleanupPolicy", c.clientType) + return clustercleanuppolicies.WithMetrics(c.inner.ClusterCleanupPolicies(), recorder) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) CleanupPolicies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { + return cleanuppolicies.WithTracing(c.inner.CleanupPolicies(namespace), c.client, "CleanupPolicy") +} +func (c *withTracing) ClusterCleanupPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { + return clustercleanuppolicies.WithTracing(c.inner.ClusterCleanupPolicies(), c.client, "ClusterCleanupPolicy") +} diff --git a/pkg/clients/kyverno/kyvernov1alpha1/clustercleanuppolicies/resource.generated.go b/pkg/clients/kyverno/kyvernov1alpha1/clustercleanuppolicies/resource.generated.go new file mode 100644 index 0000000000..b09b6fb2da --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha1/clustercleanuppolicies/resource.generated.go @@ -0,0 +1,235 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1alpha1 "github.com/kyverno/kyverno/api/kyverno/v1alpha1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha1" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1alpha1.ClusterCleanupPolicy, error) { + defer c.recorder.Record("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_v1alpha1.ClusterCleanupPolicyList, error) { + defer c.recorder.Record("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_v1alpha1.ClusterCleanupPolicy, error) { + defer c.recorder.Record("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_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1alpha1.ClusterCleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha1.ClusterCleanupPolicyList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha1.ClusterCleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1alpha2/admissionreports/resource.generated.go b/pkg/clients/kyverno/kyvernov1alpha2/admissionreports/resource.generated.go new file mode 100644 index 0000000000..8a2b0fcf23 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha2/admissionreports/resource.generated.go @@ -0,0 +1,213 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1alpha2.AdmissionReport, error) { + defer c.recorder.Record("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_v1alpha2.AdmissionReportList, error) { + defer c.recorder.Record("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_v1alpha2.AdmissionReport, error) { + defer c.recorder.Record("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_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1alpha2.AdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.AdmissionReportList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.AdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1alpha2/backgroundscanreports/resource.generated.go b/pkg/clients/kyverno/kyvernov1alpha2/backgroundscanreports/resource.generated.go new file mode 100644 index 0000000000..dab82f9ae7 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha2/backgroundscanreports/resource.generated.go @@ -0,0 +1,213 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1alpha2.BackgroundScanReport, error) { + defer c.recorder.Record("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_v1alpha2.BackgroundScanReportList, error) { + defer c.recorder.Record("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_v1alpha2.BackgroundScanReport, error) { + defer c.recorder.Record("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_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1alpha2.BackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.BackgroundScanReportList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.BackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1alpha2/client.generated.go b/pkg/clients/kyverno/kyvernov1alpha2/client.generated.go new file mode 100644 index 0000000000..ff1d0d5f95 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha2/client.generated.go @@ -0,0 +1,66 @@ +package client + +import ( + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" + admissionreports "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha2/admissionreports" + backgroundscanreports "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha2/backgroundscanreports" + clusteradmissionreports "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha2/clusteradmissionreports" + clusterbackgroundscanreports "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1alpha2/clusterbackgroundscanreports" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface, client string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) AdmissionReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "AdmissionReport", c.clientType) + return admissionreports.WithMetrics(c.inner.AdmissionReports(namespace), recorder) +} +func (c *withMetrics) BackgroundScanReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "BackgroundScanReport", c.clientType) + return backgroundscanreports.WithMetrics(c.inner.BackgroundScanReports(namespace), recorder) +} +func (c *withMetrics) ClusterAdmissionReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterAdmissionReport", c.clientType) + return clusteradmissionreports.WithMetrics(c.inner.ClusterAdmissionReports(), recorder) +} +func (c *withMetrics) ClusterBackgroundScanReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterBackgroundScanReport", c.clientType) + return clusterbackgroundscanreports.WithMetrics(c.inner.ClusterBackgroundScanReports(), recorder) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) AdmissionReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { + return admissionreports.WithTracing(c.inner.AdmissionReports(namespace), c.client, "AdmissionReport") +} +func (c *withTracing) BackgroundScanReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { + return backgroundscanreports.WithTracing(c.inner.BackgroundScanReports(namespace), c.client, "BackgroundScanReport") +} +func (c *withTracing) ClusterAdmissionReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { + return clusteradmissionreports.WithTracing(c.inner.ClusterAdmissionReports(), c.client, "ClusterAdmissionReport") +} +func (c *withTracing) ClusterBackgroundScanReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { + return clusterbackgroundscanreports.WithTracing(c.inner.ClusterBackgroundScanReports(), c.client, "ClusterBackgroundScanReport") +} diff --git a/pkg/clients/kyverno/kyvernov1alpha2/clusteradmissionreports/resource.generated.go b/pkg/clients/kyverno/kyvernov1alpha2/clusteradmissionreports/resource.generated.go new file mode 100644 index 0000000000..64c3093a43 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha2/clusteradmissionreports/resource.generated.go @@ -0,0 +1,213 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1alpha2.ClusterAdmissionReport, error) { + defer c.recorder.Record("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_v1alpha2.ClusterAdmissionReportList, error) { + defer c.recorder.Record("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_v1alpha2.ClusterAdmissionReport, error) { + defer c.recorder.Record("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_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1alpha2.ClusterAdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.ClusterAdmissionReportList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.ClusterAdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1alpha2/clusterbackgroundscanreports/resource.generated.go b/pkg/clients/kyverno/kyvernov1alpha2/clusterbackgroundscanreports/resource.generated.go new file mode 100644 index 0000000000..4a5459256e --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1alpha2/clusterbackgroundscanreports/resource.generated.go @@ -0,0 +1,213 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1alpha2.ClusterBackgroundScanReport, error) { + defer c.recorder.Record("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_v1alpha2.ClusterBackgroundScanReportList, error) { + defer c.recorder.Record("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_v1alpha2.ClusterBackgroundScanReport, error) { + defer c.recorder.Record("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_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1alpha2.ClusterBackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.ClusterBackgroundScanReportList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1alpha2.ClusterBackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/kyvernov1beta1/client.generated.go b/pkg/clients/kyverno/kyvernov1beta1/client.generated.go new file mode 100644 index 0000000000..bb8c2efe12 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1beta1/client.generated.go @@ -0,0 +1,42 @@ +package client + +import ( + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1beta1" + updaterequests "github.com/kyverno/kyverno/pkg/clients/kyverno/kyvernov1beta1/updaterequests" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface, client string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) UpdateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "UpdateRequest", c.clientType) + return updaterequests.WithMetrics(c.inner.UpdateRequests(namespace), recorder) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) UpdateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { + return updaterequests.WithTracing(c.inner.UpdateRequests(namespace), c.client, "UpdateRequest") +} diff --git a/pkg/clients/kyverno/kyvernov1beta1/updaterequests/resource.generated.go b/pkg/clients/kyverno/kyvernov1beta1/updaterequests/resource.generated.go new file mode 100644 index 0000000000..f146810f64 --- /dev/null +++ b/pkg/clients/kyverno/kyvernov1beta1/updaterequests/resource.generated.go @@ -0,0 +1,235 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_kyverno_v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1beta1" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_v1beta1.UpdateRequest, error) { + defer c.recorder.Record("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_v1beta1.UpdateRequestList, error) { + defer c.recorder.Record("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_v1beta1.UpdateRequest, error) { + defer c.recorder.Record("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_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { + defer c.recorder.Record("update_status") + return c.inner.UpdateStatus(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_v1beta1.UpdateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1beta1.UpdateRequestList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_v1beta1.UpdateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "UpdateStatus"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/wgpolicyk8sv1alpha2/client.generated.go b/pkg/clients/kyverno/wgpolicyk8sv1alpha2/client.generated.go new file mode 100644 index 0000000000..c6b774063f --- /dev/null +++ b/pkg/clients/kyverno/wgpolicyk8sv1alpha2/client.generated.go @@ -0,0 +1,50 @@ +package client + +import ( + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/policyreport/v1alpha2" + clusterpolicyreports "github.com/kyverno/kyverno/pkg/clients/kyverno/wgpolicyk8sv1alpha2/clusterpolicyreports" + policyreports "github.com/kyverno/kyverno/pkg/clients/kyverno/wgpolicyk8sv1alpha2/policyreports" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/client-go/rest" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface, client string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { + return &withTracing{inner, client} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +func (c *withMetrics) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withMetrics) ClusterPolicyReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterPolicyReport", c.clientType) + return clusterpolicyreports.WithMetrics(c.inner.ClusterPolicyReports(), recorder) +} +func (c *withMetrics) PolicyReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PolicyReport", c.clientType) + return policyreports.WithMetrics(c.inner.PolicyReports(namespace), recorder) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface + client string +} + +func (c *withTracing) RESTClient() rest.Interface { + return c.inner.RESTClient() +} +func (c *withTracing) ClusterPolicyReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { + return clusterpolicyreports.WithTracing(c.inner.ClusterPolicyReports(), c.client, "ClusterPolicyReport") +} +func (c *withTracing) PolicyReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { + return policyreports.WithTracing(c.inner.PolicyReports(namespace), c.client, "PolicyReport") +} diff --git a/pkg/clients/kyverno/wgpolicyk8sv1alpha2/clusterpolicyreports/resource.generated.go b/pkg/clients/kyverno/wgpolicyk8sv1alpha2/clusterpolicyreports/resource.generated.go new file mode 100644 index 0000000000..1e57b0897c --- /dev/null +++ b/pkg/clients/kyverno/wgpolicyk8sv1alpha2/clusterpolicyreports/resource.generated.go @@ -0,0 +1,213 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_policyreport_v1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/policyreport/v1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_policyreport_v1alpha2.ClusterPolicyReport, error) { + defer c.recorder.Record("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_policyreport_v1alpha2.ClusterPolicyReportList, error) { + defer c.recorder.Record("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_policyreport_v1alpha2.ClusterPolicyReport, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_policyreport_v1alpha2.ClusterPolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReportList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_policyreport_v1alpha2.ClusterPolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/kyverno/wgpolicyk8sv1alpha2/policyreports/resource.generated.go b/pkg/clients/kyverno/wgpolicyk8sv1alpha2/policyreports/resource.generated.go new file mode 100644 index 0000000000..74c5bdb3d4 --- /dev/null +++ b/pkg/clients/kyverno/wgpolicyk8sv1alpha2/policyreports/resource.generated.go @@ -0,0 +1,213 @@ +package resource + +import ( + context "context" + "fmt" + + github_com_kyverno_kyverno_api_policyreport_v1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" + github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/policyreport/v1alpha2" + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" +) + +func WithMetrics(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface, recorder metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface, client, kind string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { + defer c.recorder.Record("create") + return c.inner.Create(arg0, arg1, arg2) +} +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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_policyreport_v1alpha2.PolicyReport, error) { + defer c.recorder.Record("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_policyreport_v1alpha2.PolicyReportList, error) { + defer c.recorder.Record("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_policyreport_v1alpha2.PolicyReport, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { + defer c.recorder.Record("update") + return c.inner.Update(arg0, arg1, arg2) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface + client string + kind string +} + +func (c *withTracing) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Create"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Create"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Create(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + 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_policyreport_v1alpha2.PolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReportList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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_policyreport_v1alpha2.PolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Update"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Update"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Update(arg0, arg1, arg2) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/metadata/client.go b/pkg/clients/metadata/client.go new file mode 100644 index 0000000000..b7cf743341 --- /dev/null +++ b/pkg/clients/metadata/client.go @@ -0,0 +1,77 @@ +package clientset + +import ( + "github.com/kyverno/kyverno/pkg/clients/metadata/resource" + "github.com/kyverno/kyverno/pkg/metrics" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/metadata" +) + +type namespaceableInterface interface { + Namespace(string) metadata.ResourceInterface +} + +func WrapWithMetrics(inner metadata.Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) metadata.Interface { + return &withMetrics{inner, metrics, clientType} +} + +func WrapWithTracing(inner metadata.Interface) metadata.Interface { + return &withTracing{inner} +} + +type withMetrics struct { + inner metadata.Interface + metrics metrics.MetricsConfigManager + clientType metrics.ClientType +} + +type withMetricsNamespaceable struct { + metrics metrics.MetricsConfigManager + resource string + clientType metrics.ClientType + inner namespaceableInterface +} + +func (c *withMetricsNamespaceable) Namespace(namespace string) metadata.ResourceInterface { + recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, c.resource, c.clientType) + return resource.WithMetrics(c.inner.Namespace(namespace), recorder) +} + +func (c *withMetrics) Resource(gvr schema.GroupVersionResource) metadata.Getter { + recorder := metrics.ClusteredClientQueryRecorder(c.metrics, gvr.Resource, c.clientType) + inner := c.inner.Resource(gvr) + return struct { + metadata.ResourceInterface + namespaceableInterface + }{ + resource.WithMetrics(inner, recorder), + &withMetricsNamespaceable{c.metrics, gvr.Resource, c.clientType, inner}, + } +} + +type withTracing struct { + inner metadata.Interface +} + +type withTracingNamespaceable struct { + client string + kind string + inner namespaceableInterface +} + +func (c *withTracingNamespaceable) Namespace(namespace string) metadata.ResourceInterface { + return resource.WithTracing(c.inner.Namespace(namespace), c.client, c.kind) +} + +func (c *withTracing) Resource(gvr schema.GroupVersionResource) metadata.Getter { + inner := c.inner.Resource(gvr) + client := gvr.GroupResource().String() + kind := gvr.Resource + return struct { + metadata.ResourceInterface + namespaceableInterface + }{ + resource.WithTracing(inner, client, kind), + &withTracingNamespaceable{client, kind, inner}, + } +} diff --git a/pkg/clients/metadata/interface.generated.go b/pkg/clients/metadata/interface.generated.go new file mode 100644 index 0000000000..ab572b8585 --- /dev/null +++ b/pkg/clients/metadata/interface.generated.go @@ -0,0 +1,73 @@ +package clientset + +import ( + "net/http" + + "github.com/kyverno/kyverno/pkg/metrics" + k8s_io_client_go_metadata "k8s.io/client-go/metadata" + "k8s.io/client-go/rest" +) + +type Interface interface { + k8s_io_client_go_metadata.Interface + WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface + WithTracing() Interface +} + +type wrapper struct { + k8s_io_client_go_metadata.Interface +} + +type NewOption func(Interface) Interface + +func NewForConfig(c *rest.Config, opts ...NewOption) (Interface, error) { + inner, err := k8s_io_client_go_metadata.NewForConfig(c) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client, opts ...NewOption) (Interface, error) { + inner, err := k8s_io_client_go_metadata.NewForConfigAndClient(c, httpClient) + if err != nil { + return nil, err + } + return From(inner, opts...), nil +} + +func NewForConfigOrDie(c *rest.Config, opts ...NewOption) Interface { + return From(k8s_io_client_go_metadata.NewForConfigOrDie(c), opts...) +} + +func from(inner k8s_io_client_go_metadata.Interface, opts ...NewOption) Interface { + return &wrapper{inner} +} + +func From(inner k8s_io_client_go_metadata.Interface, opts ...NewOption) Interface { + i := from(inner) + for _, opt := range opts { + i = opt(i) + } + return i +} + +func (i *wrapper) WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) Interface { + return from(WrapWithMetrics(i, m, t)) +} + +func WithMetrics(m metrics.MetricsConfigManager, t metrics.ClientType) NewOption { + return func(i Interface) Interface { + return i.WithMetrics(m, t) + } +} + +func (i *wrapper) WithTracing() Interface { + return from(WrapWithTracing(i)) +} + +func WithTracing() NewOption { + return func(i Interface) Interface { + return i.WithTracing() + } +} diff --git a/pkg/clients/metadata/resource/resource.generated.go b/pkg/clients/metadata/resource/resource.generated.go new file mode 100644 index 0000000000..6425803e75 --- /dev/null +++ b/pkg/clients/metadata/resource/resource.generated.go @@ -0,0 +1,168 @@ +package resource + +import ( + context "context" + "fmt" + + "github.com/kyverno/kyverno/pkg/metrics" + "github.com/kyverno/kyverno/pkg/tracing" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" + k8s_io_client_go_metadata "k8s.io/client-go/metadata" +) + +func WithMetrics(inner k8s_io_client_go_metadata.ResourceInterface, recorder metrics.Recorder) k8s_io_client_go_metadata.ResourceInterface { + return &withMetrics{inner, recorder} +} + +func WithTracing(inner k8s_io_client_go_metadata.ResourceInterface, client, kind string) k8s_io_client_go_metadata.ResourceInterface { + return &withTracing{inner, client, kind} +} + +type withMetrics struct { + inner k8s_io_client_go_metadata.ResourceInterface + recorder metrics.Recorder +} + +func (c *withMetrics) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg3 ...string) error { + defer c.recorder.Record("delete") + return c.inner.Delete(arg0, arg1, arg2, arg3...) +} +func (c *withMetrics) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + defer c.recorder.Record("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, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1.PartialObjectMetadata, error) { + defer c.recorder.Record("get") + return c.inner.Get(arg0, arg1, arg2, arg3...) +} +func (c *withMetrics) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1.PartialObjectMetadataList, error) { + defer c.recorder.Record("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) (*k8s_io_apimachinery_pkg_apis_meta_v1.PartialObjectMetadata, error) { + defer c.recorder.Record("patch") + return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) +} +func (c *withMetrics) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + defer c.recorder.Record("watch") + return c.inner.Watch(arg0, arg1) +} + +type withTracing struct { + inner k8s_io_client_go_metadata.ResourceInterface + client string + kind string +} + +func (c *withTracing) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg3 ...string) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Delete"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Delete"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.Delete(arg0, arg1, arg2, arg3...) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "DeleteCollection"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "DeleteCollection"), + ) + defer span.End() + arg0 = ctx + ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) + if ret0 != nil { + span.RecordError(ret0) + span.SetStatus(codes.Error, ret0.Error()) + } + return ret0 +} +func (c *withTracing) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions, arg3 ...string) (*k8s_io_apimachinery_pkg_apis_meta_v1.PartialObjectMetadata, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Get"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Get"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Get(arg0, arg1, arg2, arg3...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_apimachinery_pkg_apis_meta_v1.PartialObjectMetadataList, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "List"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "List"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.List(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + 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) (*k8s_io_apimachinery_pkg_apis_meta_v1.PartialObjectMetadata, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Patch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Patch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} +func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { + ctx, span := tracing.StartSpan( + arg0, + "", + fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"), + attribute.String("client", c.client), + attribute.String("kind", c.kind), + attribute.String("operation", "Watch"), + ) + defer span.End() + arg0 = ctx + ret0, ret1 := c.inner.Watch(arg0, arg1) + if ret1 != nil { + span.RecordError(ret1) + span.SetStatus(codes.Error, ret1.Error()) + } + return ret0, ret1 +} diff --git a/pkg/clients/middleware/metrics/kube/clientset.generated.go b/pkg/clients/middleware/metrics/kube/clientset.generated.go deleted file mode 100644 index 478eb4f9ae..0000000000 --- a/pkg/clients/middleware/metrics/kube/clientset.generated.go +++ /dev/null @@ -1,6884 +0,0 @@ -package client - -import ( - context "context" - - github_com_kyverno_kyverno_pkg_metrics "github.com/kyverno/kyverno/pkg/metrics" - k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" - k8s_io_api_admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1" - k8s_io_api_apiserverinternal_v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" - k8s_io_api_apps_v1 "k8s.io/api/apps/v1" - k8s_io_api_apps_v1beta1 "k8s.io/api/apps/v1beta1" - k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" - k8s_io_api_authentication_v1 "k8s.io/api/authentication/v1" - k8s_io_api_authentication_v1beta1 "k8s.io/api/authentication/v1beta1" - k8s_io_api_authorization_v1 "k8s.io/api/authorization/v1" - k8s_io_api_authorization_v1beta1 "k8s.io/api/authorization/v1beta1" - k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" - k8s_io_api_autoscaling_v2 "k8s.io/api/autoscaling/v2" - k8s_io_api_autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1" - k8s_io_api_autoscaling_v2beta2 "k8s.io/api/autoscaling/v2beta2" - k8s_io_api_batch_v1 "k8s.io/api/batch/v1" - k8s_io_api_batch_v1beta1 "k8s.io/api/batch/v1beta1" - k8s_io_api_certificates_v1 "k8s.io/api/certificates/v1" - k8s_io_api_certificates_v1beta1 "k8s.io/api/certificates/v1beta1" - k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" - k8s_io_api_coordination_v1beta1 "k8s.io/api/coordination/v1beta1" - k8s_io_api_core_v1 "k8s.io/api/core/v1" - k8s_io_api_discovery_v1 "k8s.io/api/discovery/v1" - k8s_io_api_discovery_v1beta1 "k8s.io/api/discovery/v1beta1" - k8s_io_api_events_v1 "k8s.io/api/events/v1" - k8s_io_api_events_v1beta1 "k8s.io/api/events/v1beta1" - k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - k8s_io_api_flowcontrol_v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" - k8s_io_api_flowcontrol_v1beta1 "k8s.io/api/flowcontrol/v1beta1" - k8s_io_api_flowcontrol_v1beta2 "k8s.io/api/flowcontrol/v1beta2" - k8s_io_api_networking_v1 "k8s.io/api/networking/v1" - k8s_io_api_networking_v1alpha1 "k8s.io/api/networking/v1alpha1" - k8s_io_api_networking_v1beta1 "k8s.io/api/networking/v1beta1" - k8s_io_api_node_v1 "k8s.io/api/node/v1" - k8s_io_api_node_v1alpha1 "k8s.io/api/node/v1alpha1" - k8s_io_api_node_v1beta1 "k8s.io/api/node/v1beta1" - k8s_io_api_policy_v1 "k8s.io/api/policy/v1" - k8s_io_api_policy_v1beta1 "k8s.io/api/policy/v1beta1" - k8s_io_api_rbac_v1 "k8s.io/api/rbac/v1" - k8s_io_api_rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" - k8s_io_api_rbac_v1beta1 "k8s.io/api/rbac/v1beta1" - k8s_io_api_scheduling_v1 "k8s.io/api/scheduling/v1" - k8s_io_api_scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1" - k8s_io_api_scheduling_v1beta1 "k8s.io/api/scheduling/v1beta1" - k8s_io_api_storage_v1 "k8s.io/api/storage/v1" - k8s_io_api_storage_v1alpha1 "k8s.io/api/storage/v1alpha1" - k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" - k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8s_io_apimachinery_pkg_fields "k8s.io/apimachinery/pkg/fields" - k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime" - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" - k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" - k8s_io_client_go_applyconfigurations_admissionregistration_v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" - k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" - k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1" - k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" - k8s_io_client_go_applyconfigurations_apps_v1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" - k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" - k8s_io_client_go_applyconfigurations_autoscaling_v1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" - k8s_io_client_go_applyconfigurations_autoscaling_v2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" - k8s_io_client_go_applyconfigurations_autoscaling_v2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" - k8s_io_client_go_applyconfigurations_autoscaling_v2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" - k8s_io_client_go_applyconfigurations_batch_v1 "k8s.io/client-go/applyconfigurations/batch/v1" - k8s_io_client_go_applyconfigurations_batch_v1beta1 "k8s.io/client-go/applyconfigurations/batch/v1beta1" - k8s_io_client_go_applyconfigurations_certificates_v1 "k8s.io/client-go/applyconfigurations/certificates/v1" - k8s_io_client_go_applyconfigurations_certificates_v1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" - k8s_io_client_go_applyconfigurations_coordination_v1 "k8s.io/client-go/applyconfigurations/coordination/v1" - k8s_io_client_go_applyconfigurations_coordination_v1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" - k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" - k8s_io_client_go_applyconfigurations_discovery_v1 "k8s.io/client-go/applyconfigurations/discovery/v1" - k8s_io_client_go_applyconfigurations_discovery_v1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" - k8s_io_client_go_applyconfigurations_events_v1 "k8s.io/client-go/applyconfigurations/events/v1" - k8s_io_client_go_applyconfigurations_events_v1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" - k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" - k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" - k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" - k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" - k8s_io_client_go_applyconfigurations_networking_v1 "k8s.io/client-go/applyconfigurations/networking/v1" - k8s_io_client_go_applyconfigurations_networking_v1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - k8s_io_client_go_applyconfigurations_networking_v1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" - k8s_io_client_go_applyconfigurations_node_v1 "k8s.io/client-go/applyconfigurations/node/v1" - k8s_io_client_go_applyconfigurations_node_v1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" - k8s_io_client_go_applyconfigurations_node_v1beta1 "k8s.io/client-go/applyconfigurations/node/v1beta1" - k8s_io_client_go_applyconfigurations_policy_v1 "k8s.io/client-go/applyconfigurations/policy/v1" - k8s_io_client_go_applyconfigurations_policy_v1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" - k8s_io_client_go_applyconfigurations_rbac_v1 "k8s.io/client-go/applyconfigurations/rbac/v1" - k8s_io_client_go_applyconfigurations_rbac_v1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" - k8s_io_client_go_applyconfigurations_rbac_v1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" - k8s_io_client_go_applyconfigurations_scheduling_v1 "k8s.io/client-go/applyconfigurations/scheduling/v1" - k8s_io_client_go_applyconfigurations_scheduling_v1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" - k8s_io_client_go_applyconfigurations_scheduling_v1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" - k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" - k8s_io_client_go_applyconfigurations_storage_v1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" - k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" - k8s_io_client_go_discovery "k8s.io/client-go/discovery" - k8s_io_client_go_kubernetes "k8s.io/client-go/kubernetes" - k8s_io_client_go_kubernetes_typed_admissionregistration_v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" - k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" - k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" - k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" - k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" - k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" - k8s_io_client_go_kubernetes_typed_authentication_v1 "k8s.io/client-go/kubernetes/typed/authentication/v1" - k8s_io_client_go_kubernetes_typed_authentication_v1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" - k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" - k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" - k8s_io_client_go_kubernetes_typed_autoscaling_v1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" - k8s_io_client_go_kubernetes_typed_autoscaling_v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" - k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" - k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" - k8s_io_client_go_kubernetes_typed_batch_v1 "k8s.io/client-go/kubernetes/typed/batch/v1" - k8s_io_client_go_kubernetes_typed_batch_v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" - k8s_io_client_go_kubernetes_typed_certificates_v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" - k8s_io_client_go_kubernetes_typed_certificates_v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" - k8s_io_client_go_kubernetes_typed_coordination_v1 "k8s.io/client-go/kubernetes/typed/coordination/v1" - k8s_io_client_go_kubernetes_typed_coordination_v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" - k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" - k8s_io_client_go_kubernetes_typed_discovery_v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" - k8s_io_client_go_kubernetes_typed_discovery_v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" - k8s_io_client_go_kubernetes_typed_events_v1 "k8s.io/client-go/kubernetes/typed/events/v1" - k8s_io_client_go_kubernetes_typed_events_v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" - k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" - k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" - k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" - k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" - k8s_io_client_go_kubernetes_typed_networking_v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - k8s_io_client_go_kubernetes_typed_networking_v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" - k8s_io_client_go_kubernetes_typed_node_v1 "k8s.io/client-go/kubernetes/typed/node/v1" - k8s_io_client_go_kubernetes_typed_node_v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" - k8s_io_client_go_kubernetes_typed_node_v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" - k8s_io_client_go_kubernetes_typed_policy_v1 "k8s.io/client-go/kubernetes/typed/policy/v1" - k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" - k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" - k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" - k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" - k8s_io_client_go_kubernetes_typed_scheduling_v1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" - k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" - k8s_io_client_go_kubernetes_typed_scheduling_v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" - k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" - k8s_io_client_go_kubernetes_typed_storage_v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" - k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" - k8s_io_client_go_rest "k8s.io/client-go/rest" -) - -// Wrap -func Wrap(inner k8s_io_client_go_kubernetes.Interface, m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes.Interface { - return &clientset{ - inner: inner, - admissionregistrationv1: newAdmissionregistrationV1(inner.AdmissionregistrationV1(), m, t), - admissionregistrationv1beta1: newAdmissionregistrationV1beta1(inner.AdmissionregistrationV1beta1(), m, t), - appsv1: newAppsV1(inner.AppsV1(), m, t), - appsv1beta1: newAppsV1beta1(inner.AppsV1beta1(), m, t), - appsv1beta2: newAppsV1beta2(inner.AppsV1beta2(), m, t), - authenticationv1: newAuthenticationV1(inner.AuthenticationV1(), m, t), - authenticationv1beta1: newAuthenticationV1beta1(inner.AuthenticationV1beta1(), m, t), - authorizationv1: newAuthorizationV1(inner.AuthorizationV1(), m, t), - authorizationv1beta1: newAuthorizationV1beta1(inner.AuthorizationV1beta1(), m, t), - autoscalingv1: newAutoscalingV1(inner.AutoscalingV1(), m, t), - autoscalingv2: newAutoscalingV2(inner.AutoscalingV2(), m, t), - autoscalingv2beta1: newAutoscalingV2beta1(inner.AutoscalingV2beta1(), m, t), - autoscalingv2beta2: newAutoscalingV2beta2(inner.AutoscalingV2beta2(), m, t), - batchv1: newBatchV1(inner.BatchV1(), m, t), - batchv1beta1: newBatchV1beta1(inner.BatchV1beta1(), m, t), - certificatesv1: newCertificatesV1(inner.CertificatesV1(), m, t), - certificatesv1beta1: newCertificatesV1beta1(inner.CertificatesV1beta1(), m, t), - coordinationv1: newCoordinationV1(inner.CoordinationV1(), m, t), - coordinationv1beta1: newCoordinationV1beta1(inner.CoordinationV1beta1(), m, t), - corev1: newCoreV1(inner.CoreV1(), m, t), - discoveryv1: newDiscoveryV1(inner.DiscoveryV1(), m, t), - discoveryv1beta1: newDiscoveryV1beta1(inner.DiscoveryV1beta1(), m, t), - eventsv1: newEventsV1(inner.EventsV1(), m, t), - eventsv1beta1: newEventsV1beta1(inner.EventsV1beta1(), m, t), - extensionsv1beta1: newExtensionsV1beta1(inner.ExtensionsV1beta1(), m, t), - flowcontrolv1alpha1: newFlowcontrolV1alpha1(inner.FlowcontrolV1alpha1(), m, t), - flowcontrolv1beta1: newFlowcontrolV1beta1(inner.FlowcontrolV1beta1(), m, t), - flowcontrolv1beta2: newFlowcontrolV1beta2(inner.FlowcontrolV1beta2(), m, t), - internalv1alpha1: newInternalV1alpha1(inner.InternalV1alpha1(), m, t), - networkingv1: newNetworkingV1(inner.NetworkingV1(), m, t), - networkingv1alpha1: newNetworkingV1alpha1(inner.NetworkingV1alpha1(), m, t), - networkingv1beta1: newNetworkingV1beta1(inner.NetworkingV1beta1(), m, t), - nodev1: newNodeV1(inner.NodeV1(), m, t), - nodev1alpha1: newNodeV1alpha1(inner.NodeV1alpha1(), m, t), - nodev1beta1: newNodeV1beta1(inner.NodeV1beta1(), m, t), - policyv1: newPolicyV1(inner.PolicyV1(), m, t), - policyv1beta1: newPolicyV1beta1(inner.PolicyV1beta1(), m, t), - rbacv1: newRbacV1(inner.RbacV1(), m, t), - rbacv1alpha1: newRbacV1alpha1(inner.RbacV1alpha1(), m, t), - rbacv1beta1: newRbacV1beta1(inner.RbacV1beta1(), m, t), - schedulingv1: newSchedulingV1(inner.SchedulingV1(), m, t), - schedulingv1alpha1: newSchedulingV1alpha1(inner.SchedulingV1alpha1(), m, t), - schedulingv1beta1: newSchedulingV1beta1(inner.SchedulingV1beta1(), m, t), - storagev1: newStorageV1(inner.StorageV1(), m, t), - storagev1alpha1: newStorageV1alpha1(inner.StorageV1alpha1(), m, t), - storagev1beta1: newStorageV1beta1(inner.StorageV1beta1(), m, t), - } -} - -// clientset wrapper -type clientset struct { - inner k8s_io_client_go_kubernetes.Interface - admissionregistrationv1 k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface - admissionregistrationv1beta1 k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface - appsv1 k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface - appsv1beta1 k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface - appsv1beta2 k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface - authenticationv1 k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface - authenticationv1beta1 k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface - authorizationv1 k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface - authorizationv1beta1 k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface - autoscalingv1 k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface - autoscalingv2 k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface - autoscalingv2beta1 k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface - autoscalingv2beta2 k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface - batchv1 k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface - batchv1beta1 k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface - certificatesv1 k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface - certificatesv1beta1 k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface - coordinationv1 k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface - coordinationv1beta1 k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface - corev1 k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface - discoveryv1 k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface - discoveryv1beta1 k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface - eventsv1 k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface - eventsv1beta1 k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface - extensionsv1beta1 k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface - flowcontrolv1alpha1 k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface - flowcontrolv1beta1 k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface - flowcontrolv1beta2 k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface - internalv1alpha1 k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface - networkingv1 k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface - networkingv1alpha1 k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface - networkingv1beta1 k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface - nodev1 k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface - nodev1alpha1 k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface - nodev1beta1 k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface - policyv1 k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface - policyv1beta1 k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface - rbacv1 k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface - rbacv1alpha1 k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface - rbacv1beta1 k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface - schedulingv1 k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface - schedulingv1alpha1 k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface - schedulingv1beta1 k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface - storagev1 k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface - storagev1alpha1 k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface - storagev1beta1 k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface -} - -// Discovery is NOT instrumented -func (c *clientset) Discovery() k8s_io_client_go_discovery.DiscoveryInterface { - return c.inner.Discovery() -} -func (c *clientset) AdmissionregistrationV1() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { - return c.admissionregistrationv1 -} -func (c *clientset) AdmissionregistrationV1beta1() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { - return c.admissionregistrationv1beta1 -} -func (c *clientset) AppsV1() k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { - return c.appsv1 -} -func (c *clientset) AppsV1beta1() k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { - return c.appsv1beta1 -} -func (c *clientset) AppsV1beta2() k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { - return c.appsv1beta2 -} -func (c *clientset) AuthenticationV1() k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { - return c.authenticationv1 -} -func (c *clientset) AuthenticationV1beta1() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { - return c.authenticationv1beta1 -} -func (c *clientset) AuthorizationV1() k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { - return c.authorizationv1 -} -func (c *clientset) AuthorizationV1beta1() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { - return c.authorizationv1beta1 -} -func (c *clientset) AutoscalingV1() k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { - return c.autoscalingv1 -} -func (c *clientset) AutoscalingV2() k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { - return c.autoscalingv2 -} -func (c *clientset) AutoscalingV2beta1() k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { - return c.autoscalingv2beta1 -} -func (c *clientset) AutoscalingV2beta2() k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { - return c.autoscalingv2beta2 -} -func (c *clientset) BatchV1() k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { - return c.batchv1 -} -func (c *clientset) BatchV1beta1() k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { - return c.batchv1beta1 -} -func (c *clientset) CertificatesV1() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { - return c.certificatesv1 -} -func (c *clientset) CertificatesV1beta1() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { - return c.certificatesv1beta1 -} -func (c *clientset) CoordinationV1() k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { - return c.coordinationv1 -} -func (c *clientset) CoordinationV1beta1() k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { - return c.coordinationv1beta1 -} -func (c *clientset) CoreV1() k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { - return c.corev1 -} -func (c *clientset) DiscoveryV1() k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { - return c.discoveryv1 -} -func (c *clientset) DiscoveryV1beta1() k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { - return c.discoveryv1beta1 -} -func (c *clientset) EventsV1() k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { - return c.eventsv1 -} -func (c *clientset) EventsV1beta1() k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { - return c.eventsv1beta1 -} -func (c *clientset) ExtensionsV1beta1() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { - return c.extensionsv1beta1 -} -func (c *clientset) FlowcontrolV1alpha1() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { - return c.flowcontrolv1alpha1 -} -func (c *clientset) FlowcontrolV1beta1() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { - return c.flowcontrolv1beta1 -} -func (c *clientset) FlowcontrolV1beta2() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { - return c.flowcontrolv1beta2 -} -func (c *clientset) InternalV1alpha1() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { - return c.internalv1alpha1 -} -func (c *clientset) NetworkingV1() k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { - return c.networkingv1 -} -func (c *clientset) NetworkingV1alpha1() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { - return c.networkingv1alpha1 -} -func (c *clientset) NetworkingV1beta1() k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { - return c.networkingv1beta1 -} -func (c *clientset) NodeV1() k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { - return c.nodev1 -} -func (c *clientset) NodeV1alpha1() k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { - return c.nodev1alpha1 -} -func (c *clientset) NodeV1beta1() k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { - return c.nodev1beta1 -} -func (c *clientset) PolicyV1() k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { - return c.policyv1 -} -func (c *clientset) PolicyV1beta1() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { - return c.policyv1beta1 -} -func (c *clientset) RbacV1() k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { - return c.rbacv1 -} -func (c *clientset) RbacV1alpha1() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { - return c.rbacv1alpha1 -} -func (c *clientset) RbacV1beta1() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { - return c.rbacv1beta1 -} -func (c *clientset) SchedulingV1() k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { - return c.schedulingv1 -} -func (c *clientset) SchedulingV1alpha1() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { - return c.schedulingv1alpha1 -} -func (c *clientset) SchedulingV1beta1() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { - return c.schedulingv1beta1 -} -func (c *clientset) StorageV1() k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { - return c.storagev1 -} -func (c *clientset) StorageV1alpha1() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { - return c.storagev1alpha1 -} -func (c *clientset) StorageV1beta1() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { - return c.storagev1beta1 -} - -// wrappedAdmissionregistrationV1 wrapper -type wrappedAdmissionregistrationV1 struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAdmissionregistrationV1(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { - return &wrappedAdmissionregistrationV1{inner, metrics, t} -} -func (c *wrappedAdmissionregistrationV1) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "MutatingWebhookConfiguration", c.clientType) - return newAdmissionregistrationV1MutatingWebhookConfigurations(c.inner.MutatingWebhookConfigurations(), recorder) -} -func (c *wrappedAdmissionregistrationV1) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ValidatingWebhookConfiguration", c.clientType) - return newAdmissionregistrationV1ValidatingWebhookConfigurations(c.inner.ValidatingWebhookConfigurations(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAdmissionregistrationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAdmissionregistrationV1beta1 wrapper -type wrappedAdmissionregistrationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAdmissionregistrationV1beta1(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { - return &wrappedAdmissionregistrationV1beta1{inner, metrics, t} -} -func (c *wrappedAdmissionregistrationV1beta1) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "MutatingWebhookConfiguration", c.clientType) - return newAdmissionregistrationV1beta1MutatingWebhookConfigurations(c.inner.MutatingWebhookConfigurations(), recorder) -} -func (c *wrappedAdmissionregistrationV1beta1) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ValidatingWebhookConfiguration", c.clientType) - return newAdmissionregistrationV1beta1ValidatingWebhookConfigurations(c.inner.ValidatingWebhookConfigurations(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAdmissionregistrationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAppsV1 wrapper -type wrappedAppsV1 struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAppsV1(inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { - return &wrappedAppsV1{inner, metrics, t} -} -func (c *wrappedAppsV1) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ControllerRevision", c.clientType) - return newAppsV1ControllerRevisions(c.inner.ControllerRevisions(namespace), recorder) -} -func (c *wrappedAppsV1) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "DaemonSet", c.clientType) - return newAppsV1DaemonSets(c.inner.DaemonSets(namespace), recorder) -} -func (c *wrappedAppsV1) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) - return newAppsV1Deployments(c.inner.Deployments(namespace), recorder) -} -func (c *wrappedAppsV1) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicaSet", c.clientType) - return newAppsV1ReplicaSets(c.inner.ReplicaSets(namespace), recorder) -} -func (c *wrappedAppsV1) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "StatefulSet", c.clientType) - return newAppsV1StatefulSets(c.inner.StatefulSets(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAppsV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAppsV1beta1 wrapper -type wrappedAppsV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAppsV1beta1(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { - return &wrappedAppsV1beta1{inner, metrics, t} -} -func (c *wrappedAppsV1beta1) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ControllerRevision", c.clientType) - return newAppsV1beta1ControllerRevisions(c.inner.ControllerRevisions(namespace), recorder) -} -func (c *wrappedAppsV1beta1) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) - return newAppsV1beta1Deployments(c.inner.Deployments(namespace), recorder) -} -func (c *wrappedAppsV1beta1) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "StatefulSet", c.clientType) - return newAppsV1beta1StatefulSets(c.inner.StatefulSets(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAppsV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAppsV1beta2 wrapper -type wrappedAppsV1beta2 struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAppsV1beta2(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { - return &wrappedAppsV1beta2{inner, metrics, t} -} -func (c *wrappedAppsV1beta2) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ControllerRevision", c.clientType) - return newAppsV1beta2ControllerRevisions(c.inner.ControllerRevisions(namespace), recorder) -} -func (c *wrappedAppsV1beta2) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "DaemonSet", c.clientType) - return newAppsV1beta2DaemonSets(c.inner.DaemonSets(namespace), recorder) -} -func (c *wrappedAppsV1beta2) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) - return newAppsV1beta2Deployments(c.inner.Deployments(namespace), recorder) -} -func (c *wrappedAppsV1beta2) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicaSet", c.clientType) - return newAppsV1beta2ReplicaSets(c.inner.ReplicaSets(namespace), recorder) -} -func (c *wrappedAppsV1beta2) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "StatefulSet", c.clientType) - return newAppsV1beta2StatefulSets(c.inner.StatefulSets(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAppsV1beta2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthenticationV1 wrapper -type wrappedAuthenticationV1 struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAuthenticationV1(inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { - return &wrappedAuthenticationV1{inner, metrics, t} -} -func (c *wrappedAuthenticationV1) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "TokenReview", c.clientType) - return newAuthenticationV1TokenReviews(c.inner.TokenReviews(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthenticationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthenticationV1beta1 wrapper -type wrappedAuthenticationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAuthenticationV1beta1(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { - return &wrappedAuthenticationV1beta1{inner, metrics, t} -} -func (c *wrappedAuthenticationV1beta1) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "TokenReview", c.clientType) - return newAuthenticationV1beta1TokenReviews(c.inner.TokenReviews(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthenticationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthorizationV1 wrapper -type wrappedAuthorizationV1 struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAuthorizationV1(inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { - return &wrappedAuthorizationV1{inner, metrics, t} -} -func (c *wrappedAuthorizationV1) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LocalSubjectAccessReview", c.clientType) - return newAuthorizationV1LocalSubjectAccessReviews(c.inner.LocalSubjectAccessReviews(namespace), recorder) -} -func (c *wrappedAuthorizationV1) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectAccessReview", c.clientType) - return newAuthorizationV1SelfSubjectAccessReviews(c.inner.SelfSubjectAccessReviews(), recorder) -} -func (c *wrappedAuthorizationV1) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectRulesReview", c.clientType) - return newAuthorizationV1SelfSubjectRulesReviews(c.inner.SelfSubjectRulesReviews(), recorder) -} -func (c *wrappedAuthorizationV1) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "SubjectAccessReview", c.clientType) - return newAuthorizationV1SubjectAccessReviews(c.inner.SubjectAccessReviews(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthorizationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthorizationV1beta1 wrapper -type wrappedAuthorizationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAuthorizationV1beta1(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { - return &wrappedAuthorizationV1beta1{inner, metrics, t} -} -func (c *wrappedAuthorizationV1beta1) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LocalSubjectAccessReview", c.clientType) - return newAuthorizationV1beta1LocalSubjectAccessReviews(c.inner.LocalSubjectAccessReviews(namespace), recorder) -} -func (c *wrappedAuthorizationV1beta1) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectAccessReview", c.clientType) - return newAuthorizationV1beta1SelfSubjectAccessReviews(c.inner.SelfSubjectAccessReviews(), recorder) -} -func (c *wrappedAuthorizationV1beta1) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "SelfSubjectRulesReview", c.clientType) - return newAuthorizationV1beta1SelfSubjectRulesReviews(c.inner.SelfSubjectRulesReviews(), recorder) -} -func (c *wrappedAuthorizationV1beta1) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "SubjectAccessReview", c.clientType) - return newAuthorizationV1beta1SubjectAccessReviews(c.inner.SubjectAccessReviews(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthorizationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV1 wrapper -type wrappedAutoscalingV1 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAutoscalingV1(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { - return &wrappedAutoscalingV1{inner, metrics, t} -} -func (c *wrappedAutoscalingV1) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) - return newAutoscalingV1HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV2 wrapper -type wrappedAutoscalingV2 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAutoscalingV2(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { - return &wrappedAutoscalingV2{inner, metrics, t} -} -func (c *wrappedAutoscalingV2) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) - return newAutoscalingV2HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV2beta1 wrapper -type wrappedAutoscalingV2beta1 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAutoscalingV2beta1(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { - return &wrappedAutoscalingV2beta1{inner, metrics, t} -} -func (c *wrappedAutoscalingV2beta1) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) - return newAutoscalingV2beta1HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV2beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV2beta2 wrapper -type wrappedAutoscalingV2beta2 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newAutoscalingV2beta2(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { - return &wrappedAutoscalingV2beta2{inner, metrics, t} -} -func (c *wrappedAutoscalingV2beta2) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "HorizontalPodAutoscaler", c.clientType) - return newAutoscalingV2beta2HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV2beta2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedBatchV1 wrapper -type wrappedBatchV1 struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newBatchV1(inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { - return &wrappedBatchV1{inner, metrics, t} -} -func (c *wrappedBatchV1) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CronJob", c.clientType) - return newBatchV1CronJobs(c.inner.CronJobs(namespace), recorder) -} -func (c *wrappedBatchV1) Jobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Job", c.clientType) - return newBatchV1Jobs(c.inner.Jobs(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedBatchV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedBatchV1beta1 wrapper -type wrappedBatchV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newBatchV1beta1(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { - return &wrappedBatchV1beta1{inner, metrics, t} -} -func (c *wrappedBatchV1beta1) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CronJob", c.clientType) - return newBatchV1beta1CronJobs(c.inner.CronJobs(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedBatchV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCertificatesV1 wrapper -type wrappedCertificatesV1 struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newCertificatesV1(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { - return &wrappedCertificatesV1{inner, metrics, t} -} -func (c *wrappedCertificatesV1) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "CertificateSigningRequest", c.clientType) - return newCertificatesV1CertificateSigningRequests(c.inner.CertificateSigningRequests(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedCertificatesV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCertificatesV1beta1 wrapper -type wrappedCertificatesV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newCertificatesV1beta1(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { - return &wrappedCertificatesV1beta1{inner, metrics, t} -} -func (c *wrappedCertificatesV1beta1) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "CertificateSigningRequest", c.clientType) - return newCertificatesV1beta1CertificateSigningRequests(c.inner.CertificateSigningRequests(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedCertificatesV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCoordinationV1 wrapper -type wrappedCoordinationV1 struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newCoordinationV1(inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { - return &wrappedCoordinationV1{inner, metrics, t} -} -func (c *wrappedCoordinationV1) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Lease", c.clientType) - return newCoordinationV1Leases(c.inner.Leases(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedCoordinationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCoordinationV1beta1 wrapper -type wrappedCoordinationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newCoordinationV1beta1(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { - return &wrappedCoordinationV1beta1{inner, metrics, t} -} -func (c *wrappedCoordinationV1beta1) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Lease", c.clientType) - return newCoordinationV1beta1Leases(c.inner.Leases(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedCoordinationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCoreV1 wrapper -type wrappedCoreV1 struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newCoreV1(inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { - return &wrappedCoreV1{inner, metrics, t} -} -func (c *wrappedCoreV1) ComponentStatuses() k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ComponentStatus", c.clientType) - return newCoreV1ComponentStatuses(c.inner.ComponentStatuses(), recorder) -} -func (c *wrappedCoreV1) ConfigMaps(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ConfigMap", c.clientType) - return newCoreV1ConfigMaps(c.inner.ConfigMaps(namespace), recorder) -} -func (c *wrappedCoreV1) Endpoints(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Endpoints", c.clientType) - return newCoreV1Endpoints(c.inner.Endpoints(namespace), recorder) -} -func (c *wrappedCoreV1) Events(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Event", c.clientType) - return newCoreV1Events(c.inner.Events(namespace), recorder) -} -func (c *wrappedCoreV1) LimitRanges(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LimitRange", c.clientType) - return newCoreV1LimitRanges(c.inner.LimitRanges(namespace), recorder) -} -func (c *wrappedCoreV1) Namespaces() k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "Namespace", c.clientType) - return newCoreV1Namespaces(c.inner.Namespaces(), recorder) -} -func (c *wrappedCoreV1) Nodes() k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "Node", c.clientType) - return newCoreV1Nodes(c.inner.Nodes(), recorder) -} -func (c *wrappedCoreV1) PersistentVolumeClaims(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PersistentVolumeClaim", c.clientType) - return newCoreV1PersistentVolumeClaims(c.inner.PersistentVolumeClaims(namespace), recorder) -} -func (c *wrappedCoreV1) PersistentVolumes() k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PersistentVolume", c.clientType) - return newCoreV1PersistentVolumes(c.inner.PersistentVolumes(), recorder) -} -func (c *wrappedCoreV1) PodTemplates(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PodTemplate", c.clientType) - return newCoreV1PodTemplates(c.inner.PodTemplates(namespace), recorder) -} -func (c *wrappedCoreV1) Pods(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Pod", c.clientType) - return newCoreV1Pods(c.inner.Pods(namespace), recorder) -} -func (c *wrappedCoreV1) ReplicationControllers(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicationController", c.clientType) - return newCoreV1ReplicationControllers(c.inner.ReplicationControllers(namespace), recorder) -} -func (c *wrappedCoreV1) ResourceQuotas(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ResourceQuota", c.clientType) - return newCoreV1ResourceQuotas(c.inner.ResourceQuotas(namespace), recorder) -} -func (c *wrappedCoreV1) Secrets(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Secret", c.clientType) - return newCoreV1Secrets(c.inner.Secrets(namespace), recorder) -} -func (c *wrappedCoreV1) ServiceAccounts(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ServiceAccount", c.clientType) - return newCoreV1ServiceAccounts(c.inner.ServiceAccounts(namespace), recorder) -} -func (c *wrappedCoreV1) Services(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Service", c.clientType) - return newCoreV1Services(c.inner.Services(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedCoreV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedDiscoveryV1 wrapper -type wrappedDiscoveryV1 struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newDiscoveryV1(inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { - return &wrappedDiscoveryV1{inner, metrics, t} -} -func (c *wrappedDiscoveryV1) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "EndpointSlice", c.clientType) - return newDiscoveryV1EndpointSlices(c.inner.EndpointSlices(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedDiscoveryV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedDiscoveryV1beta1 wrapper -type wrappedDiscoveryV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newDiscoveryV1beta1(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { - return &wrappedDiscoveryV1beta1{inner, metrics, t} -} -func (c *wrappedDiscoveryV1beta1) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "EndpointSlice", c.clientType) - return newDiscoveryV1beta1EndpointSlices(c.inner.EndpointSlices(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedDiscoveryV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedEventsV1 wrapper -type wrappedEventsV1 struct { - inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newEventsV1(inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { - return &wrappedEventsV1{inner, metrics, t} -} -func (c *wrappedEventsV1) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Event", c.clientType) - return newEventsV1Events(c.inner.Events(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedEventsV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedEventsV1beta1 wrapper -type wrappedEventsV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newEventsV1beta1(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { - return &wrappedEventsV1beta1{inner, metrics, t} -} -func (c *wrappedEventsV1beta1) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Event", c.clientType) - return newEventsV1beta1Events(c.inner.Events(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedEventsV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedExtensionsV1beta1 wrapper -type wrappedExtensionsV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newExtensionsV1beta1(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { - return &wrappedExtensionsV1beta1{inner, metrics, t} -} -func (c *wrappedExtensionsV1beta1) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "DaemonSet", c.clientType) - return newExtensionsV1beta1DaemonSets(c.inner.DaemonSets(namespace), recorder) -} -func (c *wrappedExtensionsV1beta1) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Deployment", c.clientType) - return newExtensionsV1beta1Deployments(c.inner.Deployments(namespace), recorder) -} -func (c *wrappedExtensionsV1beta1) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Ingress", c.clientType) - return newExtensionsV1beta1Ingresses(c.inner.Ingresses(namespace), recorder) -} -func (c *wrappedExtensionsV1beta1) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "NetworkPolicy", c.clientType) - return newExtensionsV1beta1NetworkPolicies(c.inner.NetworkPolicies(namespace), recorder) -} -func (c *wrappedExtensionsV1beta1) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PodSecurityPolicy", c.clientType) - return newExtensionsV1beta1PodSecurityPolicies(c.inner.PodSecurityPolicies(), recorder) -} -func (c *wrappedExtensionsV1beta1) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "ReplicaSet", c.clientType) - return newExtensionsV1beta1ReplicaSets(c.inner.ReplicaSets(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedExtensionsV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedFlowcontrolV1alpha1 wrapper -type wrappedFlowcontrolV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newFlowcontrolV1alpha1(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { - return &wrappedFlowcontrolV1alpha1{inner, metrics, t} -} -func (c *wrappedFlowcontrolV1alpha1) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "FlowSchema", c.clientType) - return newFlowcontrolV1alpha1FlowSchemas(c.inner.FlowSchemas(), recorder) -} -func (c *wrappedFlowcontrolV1alpha1) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityLevelConfiguration", c.clientType) - return newFlowcontrolV1alpha1PriorityLevelConfigurations(c.inner.PriorityLevelConfigurations(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedFlowcontrolV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedFlowcontrolV1beta1 wrapper -type wrappedFlowcontrolV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newFlowcontrolV1beta1(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { - return &wrappedFlowcontrolV1beta1{inner, metrics, t} -} -func (c *wrappedFlowcontrolV1beta1) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "FlowSchema", c.clientType) - return newFlowcontrolV1beta1FlowSchemas(c.inner.FlowSchemas(), recorder) -} -func (c *wrappedFlowcontrolV1beta1) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityLevelConfiguration", c.clientType) - return newFlowcontrolV1beta1PriorityLevelConfigurations(c.inner.PriorityLevelConfigurations(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedFlowcontrolV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedFlowcontrolV1beta2 wrapper -type wrappedFlowcontrolV1beta2 struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newFlowcontrolV1beta2(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { - return &wrappedFlowcontrolV1beta2{inner, metrics, t} -} -func (c *wrappedFlowcontrolV1beta2) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "FlowSchema", c.clientType) - return newFlowcontrolV1beta2FlowSchemas(c.inner.FlowSchemas(), recorder) -} -func (c *wrappedFlowcontrolV1beta2) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityLevelConfiguration", c.clientType) - return newFlowcontrolV1beta2PriorityLevelConfigurations(c.inner.PriorityLevelConfigurations(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedFlowcontrolV1beta2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedInternalV1alpha1 wrapper -type wrappedInternalV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newInternalV1alpha1(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { - return &wrappedInternalV1alpha1{inner, metrics, t} -} -func (c *wrappedInternalV1alpha1) StorageVersions() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "StorageVersion", c.clientType) - return newInternalV1alpha1StorageVersions(c.inner.StorageVersions(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedInternalV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNetworkingV1 wrapper -type wrappedNetworkingV1 struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newNetworkingV1(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { - return &wrappedNetworkingV1{inner, metrics, t} -} -func (c *wrappedNetworkingV1) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "IngressClass", c.clientType) - return newNetworkingV1IngressClasses(c.inner.IngressClasses(), recorder) -} -func (c *wrappedNetworkingV1) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Ingress", c.clientType) - return newNetworkingV1Ingresses(c.inner.Ingresses(namespace), recorder) -} -func (c *wrappedNetworkingV1) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "NetworkPolicy", c.clientType) - return newNetworkingV1NetworkPolicies(c.inner.NetworkPolicies(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedNetworkingV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNetworkingV1alpha1 wrapper -type wrappedNetworkingV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newNetworkingV1alpha1(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { - return &wrappedNetworkingV1alpha1{inner, metrics, t} -} -func (c *wrappedNetworkingV1alpha1) ClusterCIDRs() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterCIDR", c.clientType) - return newNetworkingV1alpha1ClusterCIDRs(c.inner.ClusterCIDRs(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedNetworkingV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNetworkingV1beta1 wrapper -type wrappedNetworkingV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newNetworkingV1beta1(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { - return &wrappedNetworkingV1beta1{inner, metrics, t} -} -func (c *wrappedNetworkingV1beta1) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "IngressClass", c.clientType) - return newNetworkingV1beta1IngressClasses(c.inner.IngressClasses(), recorder) -} -func (c *wrappedNetworkingV1beta1) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Ingress", c.clientType) - return newNetworkingV1beta1Ingresses(c.inner.Ingresses(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedNetworkingV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNodeV1 wrapper -type wrappedNodeV1 struct { - inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newNodeV1(inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { - return &wrappedNodeV1{inner, metrics, t} -} -func (c *wrappedNodeV1) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "RuntimeClass", c.clientType) - return newNodeV1RuntimeClasses(c.inner.RuntimeClasses(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedNodeV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNodeV1alpha1 wrapper -type wrappedNodeV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newNodeV1alpha1(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { - return &wrappedNodeV1alpha1{inner, metrics, t} -} -func (c *wrappedNodeV1alpha1) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "RuntimeClass", c.clientType) - return newNodeV1alpha1RuntimeClasses(c.inner.RuntimeClasses(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedNodeV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNodeV1beta1 wrapper -type wrappedNodeV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newNodeV1beta1(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { - return &wrappedNodeV1beta1{inner, metrics, t} -} -func (c *wrappedNodeV1beta1) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "RuntimeClass", c.clientType) - return newNodeV1beta1RuntimeClasses(c.inner.RuntimeClasses(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedNodeV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedPolicyV1 wrapper -type wrappedPolicyV1 struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newPolicyV1(inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { - return &wrappedPolicyV1{inner, metrics, t} -} -func (c *wrappedPolicyV1) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Eviction", c.clientType) - return newPolicyV1Evictions(c.inner.Evictions(namespace), recorder) -} -func (c *wrappedPolicyV1) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PodDisruptionBudget", c.clientType) - return newPolicyV1PodDisruptionBudgets(c.inner.PodDisruptionBudgets(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedPolicyV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedPolicyV1beta1 wrapper -type wrappedPolicyV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newPolicyV1beta1(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { - return &wrappedPolicyV1beta1{inner, metrics, t} -} -func (c *wrappedPolicyV1beta1) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Eviction", c.clientType) - return newPolicyV1beta1Evictions(c.inner.Evictions(namespace), recorder) -} -func (c *wrappedPolicyV1beta1) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PodDisruptionBudget", c.clientType) - return newPolicyV1beta1PodDisruptionBudgets(c.inner.PodDisruptionBudgets(namespace), recorder) -} -func (c *wrappedPolicyV1beta1) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PodSecurityPolicy", c.clientType) - return newPolicyV1beta1PodSecurityPolicies(c.inner.PodSecurityPolicies(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedPolicyV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedRbacV1 wrapper -type wrappedRbacV1 struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newRbacV1(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { - return &wrappedRbacV1{inner, metrics, t} -} -func (c *wrappedRbacV1) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRoleBinding", c.clientType) - return newRbacV1ClusterRoleBindings(c.inner.ClusterRoleBindings(), recorder) -} -func (c *wrappedRbacV1) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRole", c.clientType) - return newRbacV1ClusterRoles(c.inner.ClusterRoles(), recorder) -} -func (c *wrappedRbacV1) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "RoleBinding", c.clientType) - return newRbacV1RoleBindings(c.inner.RoleBindings(namespace), recorder) -} -func (c *wrappedRbacV1) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Role", c.clientType) - return newRbacV1Roles(c.inner.Roles(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedRbacV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedRbacV1alpha1 wrapper -type wrappedRbacV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newRbacV1alpha1(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { - return &wrappedRbacV1alpha1{inner, metrics, t} -} -func (c *wrappedRbacV1alpha1) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRoleBinding", c.clientType) - return newRbacV1alpha1ClusterRoleBindings(c.inner.ClusterRoleBindings(), recorder) -} -func (c *wrappedRbacV1alpha1) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRole", c.clientType) - return newRbacV1alpha1ClusterRoles(c.inner.ClusterRoles(), recorder) -} -func (c *wrappedRbacV1alpha1) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "RoleBinding", c.clientType) - return newRbacV1alpha1RoleBindings(c.inner.RoleBindings(namespace), recorder) -} -func (c *wrappedRbacV1alpha1) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Role", c.clientType) - return newRbacV1alpha1Roles(c.inner.Roles(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedRbacV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedRbacV1beta1 wrapper -type wrappedRbacV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newRbacV1beta1(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { - return &wrappedRbacV1beta1{inner, metrics, t} -} -func (c *wrappedRbacV1beta1) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRoleBinding", c.clientType) - return newRbacV1beta1ClusterRoleBindings(c.inner.ClusterRoleBindings(), recorder) -} -func (c *wrappedRbacV1beta1) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterRole", c.clientType) - return newRbacV1beta1ClusterRoles(c.inner.ClusterRoles(), recorder) -} -func (c *wrappedRbacV1beta1) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "RoleBinding", c.clientType) - return newRbacV1beta1RoleBindings(c.inner.RoleBindings(namespace), recorder) -} -func (c *wrappedRbacV1beta1) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Role", c.clientType) - return newRbacV1beta1Roles(c.inner.Roles(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedRbacV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedSchedulingV1 wrapper -type wrappedSchedulingV1 struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newSchedulingV1(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { - return &wrappedSchedulingV1{inner, metrics, t} -} -func (c *wrappedSchedulingV1) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityClass", c.clientType) - return newSchedulingV1PriorityClasses(c.inner.PriorityClasses(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedSchedulingV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedSchedulingV1alpha1 wrapper -type wrappedSchedulingV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newSchedulingV1alpha1(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { - return &wrappedSchedulingV1alpha1{inner, metrics, t} -} -func (c *wrappedSchedulingV1alpha1) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityClass", c.clientType) - return newSchedulingV1alpha1PriorityClasses(c.inner.PriorityClasses(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedSchedulingV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedSchedulingV1beta1 wrapper -type wrappedSchedulingV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newSchedulingV1beta1(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { - return &wrappedSchedulingV1beta1{inner, metrics, t} -} -func (c *wrappedSchedulingV1beta1) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "PriorityClass", c.clientType) - return newSchedulingV1beta1PriorityClasses(c.inner.PriorityClasses(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedSchedulingV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedStorageV1 wrapper -type wrappedStorageV1 struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newStorageV1(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { - return &wrappedStorageV1{inner, metrics, t} -} -func (c *wrappedStorageV1) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "CSIDriver", c.clientType) - return newStorageV1CSIDrivers(c.inner.CSIDrivers(), recorder) -} -func (c *wrappedStorageV1) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "CSINode", c.clientType) - return newStorageV1CSINodes(c.inner.CSINodes(), recorder) -} -func (c *wrappedStorageV1) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CSIStorageCapacity", c.clientType) - return newStorageV1CSIStorageCapacities(c.inner.CSIStorageCapacities(namespace), recorder) -} -func (c *wrappedStorageV1) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "StorageClass", c.clientType) - return newStorageV1StorageClasses(c.inner.StorageClasses(), recorder) -} -func (c *wrappedStorageV1) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "VolumeAttachment", c.clientType) - return newStorageV1VolumeAttachments(c.inner.VolumeAttachments(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedStorageV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedStorageV1alpha1 wrapper -type wrappedStorageV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newStorageV1alpha1(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { - return &wrappedStorageV1alpha1{inner, metrics, t} -} -func (c *wrappedStorageV1alpha1) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CSIStorageCapacity", c.clientType) - return newStorageV1alpha1CSIStorageCapacities(c.inner.CSIStorageCapacities(namespace), recorder) -} -func (c *wrappedStorageV1alpha1) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "VolumeAttachment", c.clientType) - return newStorageV1alpha1VolumeAttachments(c.inner.VolumeAttachments(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedStorageV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedStorageV1beta1 wrapper -type wrappedStorageV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newStorageV1beta1(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { - return &wrappedStorageV1beta1{inner, metrics, t} -} -func (c *wrappedStorageV1beta1) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "CSIDriver", c.clientType) - return newStorageV1beta1CSIDrivers(c.inner.CSIDrivers(), recorder) -} -func (c *wrappedStorageV1beta1) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "CSINode", c.clientType) - return newStorageV1beta1CSINodes(c.inner.CSINodes(), recorder) -} -func (c *wrappedStorageV1beta1) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CSIStorageCapacity", c.clientType) - return newStorageV1beta1CSIStorageCapacities(c.inner.CSIStorageCapacities(namespace), recorder) -} -func (c *wrappedStorageV1beta1) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "StorageClass", c.clientType) - return newStorageV1beta1StorageClasses(c.inner.StorageClasses(), recorder) -} -func (c *wrappedStorageV1beta1) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "VolumeAttachment", c.clientType) - return newStorageV1beta1VolumeAttachments(c.inner.VolumeAttachments(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedStorageV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAdmissionregistrationV1MutatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1MutatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAdmissionregistrationV1MutatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1MutatingWebhookConfigurations{inner, recorder} -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAdmissionregistrationV1ValidatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1ValidatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAdmissionregistrationV1ValidatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1ValidatingWebhookConfigurations{inner, recorder} -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAdmissionregistrationV1beta1MutatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations{inner, recorder} -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAdmissionregistrationV1beta1ValidatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations{inner, recorder} -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1ControllerRevisions wrapper -type wrappedAppsV1ControllerRevisions struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1ControllerRevisions(inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { - return &wrappedAppsV1ControllerRevisions{inner, recorder} -} -func (c *wrappedAppsV1ControllerRevisions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ControllerRevisions) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ControllerRevisions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ControllerRevisions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ControllerRevisions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ControllerRevisions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ControllerRevisionList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1ControllerRevisions) 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) (*k8s_io_api_apps_v1.ControllerRevision, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1ControllerRevisions) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ControllerRevisions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1DaemonSets wrapper -type wrappedAppsV1DaemonSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1DaemonSets(inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { - return &wrappedAppsV1DaemonSets{inner, recorder} -} -func (c *wrappedAppsV1DaemonSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DaemonSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1DaemonSets) 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) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1DaemonSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1DaemonSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1Deployments wrapper -type wrappedAppsV1Deployments struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1Deployments(inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { - return &wrappedAppsV1Deployments{inner, recorder} -} -func (c *wrappedAppsV1Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("apply_scale") - return c.inner.ApplyScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DeploymentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1Deployments) 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) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1ReplicaSets wrapper -type wrappedAppsV1ReplicaSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1ReplicaSets(inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { - return &wrappedAppsV1ReplicaSets{inner, recorder} -} -func (c *wrappedAppsV1ReplicaSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("apply_scale") - return c.inner.ApplyScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1ReplicaSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ReplicaSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1ReplicaSets) 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) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1ReplicaSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1ReplicaSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1ReplicaSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1StatefulSets wrapper -type wrappedAppsV1StatefulSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1StatefulSets(inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { - return &wrappedAppsV1StatefulSets{inner, recorder} -} -func (c *wrappedAppsV1StatefulSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("apply_scale") - return c.inner.ApplyScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1StatefulSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.StatefulSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1StatefulSets) 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) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1StatefulSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1StatefulSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1StatefulSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta1ControllerRevisions wrapper -type wrappedAppsV1beta1ControllerRevisions struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta1ControllerRevisions(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { - return &wrappedAppsV1beta1ControllerRevisions{inner, recorder} -} -func (c *wrappedAppsV1beta1ControllerRevisions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1ControllerRevisions) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1ControllerRevisions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1ControllerRevisions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1ControllerRevisions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1ControllerRevisions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.ControllerRevisionList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta1ControllerRevisions) 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) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta1ControllerRevisions) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1ControllerRevisions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta1Deployments wrapper -type wrappedAppsV1beta1Deployments struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta1Deployments(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { - return &wrappedAppsV1beta1Deployments{inner, recorder} -} -func (c *wrappedAppsV1beta1Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.DeploymentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta1Deployments) 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) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta1Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta1StatefulSets wrapper -type wrappedAppsV1beta1StatefulSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta1StatefulSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { - return &wrappedAppsV1beta1StatefulSets{inner, recorder} -} -func (c *wrappedAppsV1beta1StatefulSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.StatefulSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta1StatefulSets) 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) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta1StatefulSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta1StatefulSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta2ControllerRevisions wrapper -type wrappedAppsV1beta2ControllerRevisions struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta2ControllerRevisions(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { - return &wrappedAppsV1beta2ControllerRevisions{inner, recorder} -} -func (c *wrappedAppsV1beta2ControllerRevisions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ControllerRevisions) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ControllerRevisions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ControllerRevisions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ControllerRevisions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ControllerRevisions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ControllerRevisionList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta2ControllerRevisions) 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) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta2ControllerRevisions) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ControllerRevisions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta2DaemonSets wrapper -type wrappedAppsV1beta2DaemonSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta2DaemonSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { - return &wrappedAppsV1beta2DaemonSets{inner, recorder} -} -func (c *wrappedAppsV1beta2DaemonSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DaemonSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta2DaemonSets) 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) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta2DaemonSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2DaemonSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta2Deployments wrapper -type wrappedAppsV1beta2Deployments struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta2Deployments(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { - return &wrappedAppsV1beta2Deployments{inner, recorder} -} -func (c *wrappedAppsV1beta2Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DeploymentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta2Deployments) 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) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta2Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta2ReplicaSets wrapper -type wrappedAppsV1beta2ReplicaSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta2ReplicaSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { - return &wrappedAppsV1beta2ReplicaSets{inner, recorder} -} -func (c *wrappedAppsV1beta2ReplicaSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ReplicaSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta2ReplicaSets) 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) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta2ReplicaSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2ReplicaSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAppsV1beta2StatefulSets wrapper -type wrappedAppsV1beta2StatefulSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAppsV1beta2StatefulSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { - return &wrappedAppsV1beta2StatefulSets{inner, recorder} -} -func (c *wrappedAppsV1beta2StatefulSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { - defer c.recorder.Record("apply_scale") - return c.inner.ApplyScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1beta2StatefulSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.StatefulSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAppsV1beta2StatefulSets) 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) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAppsV1beta2StatefulSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_apps_v1beta2.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedAppsV1beta2StatefulSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAppsV1beta2StatefulSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAuthenticationV1TokenReviews wrapper -type wrappedAuthenticationV1TokenReviews struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthenticationV1TokenReviews(inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { - return &wrappedAuthenticationV1TokenReviews{inner, recorder} -} -func (c *wrappedAuthenticationV1TokenReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthenticationV1beta1TokenReviews wrapper -type wrappedAuthenticationV1beta1TokenReviews struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthenticationV1beta1TokenReviews(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { - return &wrappedAuthenticationV1beta1TokenReviews{inner, recorder} -} -func (c *wrappedAuthenticationV1beta1TokenReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1beta1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1beta1.TokenReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1LocalSubjectAccessReviews wrapper -type wrappedAuthorizationV1LocalSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1LocalSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { - return &wrappedAuthorizationV1LocalSubjectAccessReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1LocalSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.LocalSubjectAccessReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1SelfSubjectAccessReviews wrapper -type wrappedAuthorizationV1SelfSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1SelfSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { - return &wrappedAuthorizationV1SelfSubjectAccessReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1SelfSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectAccessReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1SelfSubjectRulesReviews wrapper -type wrappedAuthorizationV1SelfSubjectRulesReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1SelfSubjectRulesReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { - return &wrappedAuthorizationV1SelfSubjectRulesReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1SelfSubjectRulesReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectRulesReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1SubjectAccessReviews wrapper -type wrappedAuthorizationV1SubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1SubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { - return &wrappedAuthorizationV1SubjectAccessReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1SubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SubjectAccessReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1beta1LocalSubjectAccessReviews wrapper -type wrappedAuthorizationV1beta1LocalSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1beta1LocalSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { - return &wrappedAuthorizationV1beta1LocalSubjectAccessReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1beta1LocalSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1beta1SelfSubjectAccessReviews wrapper -type wrappedAuthorizationV1beta1SelfSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1beta1SelfSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { - return &wrappedAuthorizationV1beta1SelfSubjectAccessReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1beta1SelfSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1beta1SelfSubjectRulesReviews wrapper -type wrappedAuthorizationV1beta1SelfSubjectRulesReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1beta1SelfSubjectRulesReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { - return &wrappedAuthorizationV1beta1SelfSubjectRulesReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1beta1SelfSubjectRulesReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAuthorizationV1beta1SubjectAccessReviews wrapper -type wrappedAuthorizationV1beta1SubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAuthorizationV1beta1SubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { - return &wrappedAuthorizationV1beta1SubjectAccessReviews{inner, recorder} -} -func (c *wrappedAuthorizationV1beta1SubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SubjectAccessReview, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} - -// wrappedAutoscalingV1HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV1HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAutoscalingV1HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV1HorizontalPodAutoscalers{inner, recorder} -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscalerList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAutoscalingV2HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV2HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAutoscalingV2HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV2HorizontalPodAutoscalers{inner, recorder} -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscalerList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAutoscalingV2beta1HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV2beta1HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAutoscalingV2beta1HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV2beta1HorizontalPodAutoscalers{inner, recorder} -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscalerList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedAutoscalingV2beta2HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV2beta2HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newAutoscalingV2beta2HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV2beta2HorizontalPodAutoscalers{inner, recorder} -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscalerList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedBatchV1CronJobs wrapper -type wrappedBatchV1CronJobs struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newBatchV1CronJobs(inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { - return &wrappedBatchV1CronJobs{inner, recorder} -} -func (c *wrappedBatchV1CronJobs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.CronJobList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedBatchV1CronJobs) 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) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedBatchV1CronJobs) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedBatchV1CronJobs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedBatchV1Jobs wrapper -type wrappedBatchV1Jobs struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newBatchV1Jobs(inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { - return &wrappedBatchV1Jobs{inner, recorder} -} -func (c *wrappedBatchV1Jobs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.JobList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedBatchV1Jobs) 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) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedBatchV1Jobs) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedBatchV1Jobs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedBatchV1beta1CronJobs wrapper -type wrappedBatchV1beta1CronJobs struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newBatchV1beta1CronJobs(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { - return &wrappedBatchV1beta1CronJobs{inner, recorder} -} -func (c *wrappedBatchV1beta1CronJobs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1beta1.CronJobList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedBatchV1beta1CronJobs) 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) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedBatchV1beta1CronJobs) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedBatchV1beta1CronJobs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCertificatesV1CertificateSigningRequests wrapper -type wrappedCertificatesV1CertificateSigningRequests struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCertificatesV1CertificateSigningRequests(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { - return &wrappedCertificatesV1CertificateSigningRequests{inner, recorder} -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequestList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) 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) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) UpdateApproval(arg0 context.Context, arg1 string, arg2 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("update_approval") - return c.inner.UpdateApproval(arg0, arg1, arg2, arg3) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCertificatesV1beta1CertificateSigningRequests wrapper -type wrappedCertificatesV1beta1CertificateSigningRequests struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCertificatesV1beta1CertificateSigningRequests(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { - return &wrappedCertificatesV1beta1CertificateSigningRequests{inner, recorder} -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequestList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) 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) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) UpdateApproval(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("update_approval") - return c.inner.UpdateApproval(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoordinationV1Leases wrapper -type wrappedCoordinationV1Leases struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoordinationV1Leases(inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { - return &wrappedCoordinationV1Leases{inner, recorder} -} -func (c *wrappedCoordinationV1Leases) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1.Lease, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1Leases) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1.Lease, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1Leases) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1Leases) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1Leases) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_coordination_v1.Lease, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1Leases) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1.LeaseList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoordinationV1Leases) 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) (*k8s_io_api_coordination_v1.Lease, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoordinationV1Leases) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1.Lease, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1Leases) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoordinationV1beta1Leases wrapper -type wrappedCoordinationV1beta1Leases struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoordinationV1beta1Leases(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { - return &wrappedCoordinationV1beta1Leases{inner, recorder} -} -func (c *wrappedCoordinationV1beta1Leases) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1beta1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1beta1Leases) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1beta1Leases) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1beta1Leases) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1beta1Leases) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1beta1Leases) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1beta1.LeaseList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoordinationV1beta1Leases) 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) (*k8s_io_api_coordination_v1beta1.Lease, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoordinationV1beta1Leases) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoordinationV1beta1Leases) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1ComponentStatuses wrapper -type wrappedCoreV1ComponentStatuses struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1ComponentStatuses(inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { - return &wrappedCoreV1ComponentStatuses{inner, recorder} -} -func (c *wrappedCoreV1ComponentStatuses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ComponentStatusApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ComponentStatuses) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ComponentStatuses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ComponentStatuses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ComponentStatuses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ComponentStatuses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ComponentStatusList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1ComponentStatuses) 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) (*k8s_io_api_core_v1.ComponentStatus, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1ComponentStatuses) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ComponentStatuses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1ConfigMaps wrapper -type wrappedCoreV1ConfigMaps struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1ConfigMaps(inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { - return &wrappedCoreV1ConfigMaps{inner, recorder} -} -func (c *wrappedCoreV1ConfigMaps) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ConfigMapApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ConfigMaps) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ConfigMaps) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ConfigMaps) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ConfigMaps) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ConfigMaps) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ConfigMapList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1ConfigMaps) 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) (*k8s_io_api_core_v1.ConfigMap, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1ConfigMaps) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ConfigMaps) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Endpoints wrapper -type wrappedCoreV1Endpoints struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Endpoints(inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { - return &wrappedCoreV1Endpoints{inner, recorder} -} -func (c *wrappedCoreV1Endpoints) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EndpointsApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Endpoints, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Endpoints) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Endpoints, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Endpoints) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Endpoints) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Endpoints) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Endpoints, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Endpoints) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EndpointsList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Endpoints) 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) (*k8s_io_api_core_v1.Endpoints, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Endpoints) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Endpoints, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Endpoints) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Events wrapper -type wrappedCoreV1Events struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Events(inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { - return &wrappedCoreV1Events{inner, recorder} -} -func (c *wrappedCoreV1Events) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Events) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Events) CreateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("create_with_event_namespace") - return c.inner.CreateWithEventNamespace(arg0) -} -func (c *wrappedCoreV1Events) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Events) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Events) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Events) GetFieldSelector(arg0 *string, arg1 *string, arg2 *string, arg3 *string) k8s_io_apimachinery_pkg_fields.Selector { - defer c.recorder.Record("get_field_selector") - return c.inner.GetFieldSelector(arg0, arg1, arg2, arg3) -} -func (c *wrappedCoreV1Events) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EventList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Events) 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) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Events) PatchWithEventNamespace(arg0 *k8s_io_api_core_v1.Event, arg1 []uint8) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("patch_with_event_namespace") - return c.inner.PatchWithEventNamespace(arg0, arg1) -} -func (c *wrappedCoreV1Events) Search(arg0 *k8s_io_apimachinery_pkg_runtime.Scheme, arg1 k8s_io_apimachinery_pkg_runtime.Object) (*k8s_io_api_core_v1.EventList, error) { - defer c.recorder.Record("search") - return c.inner.Search(arg0, arg1) -} -func (c *wrappedCoreV1Events) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Events) UpdateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { - defer c.recorder.Record("update_with_event_namespace") - return c.inner.UpdateWithEventNamespace(arg0) -} -func (c *wrappedCoreV1Events) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1LimitRanges wrapper -type wrappedCoreV1LimitRanges struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1LimitRanges(inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { - return &wrappedCoreV1LimitRanges{inner, recorder} -} -func (c *wrappedCoreV1LimitRanges) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.LimitRangeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.LimitRange, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1LimitRanges) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.LimitRange, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1LimitRanges) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1LimitRanges) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1LimitRanges) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.LimitRange, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1LimitRanges) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.LimitRangeList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1LimitRanges) 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) (*k8s_io_api_core_v1.LimitRange, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1LimitRanges) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.LimitRange, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1LimitRanges) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Namespaces wrapper -type wrappedCoreV1Namespaces struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Namespaces(inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { - return &wrappedCoreV1Namespaces{inner, recorder} -} -func (c *wrappedCoreV1Namespaces) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) Finalize(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("finalize") - return c.inner.Finalize(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NamespaceList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Namespaces) 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) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Namespaces) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Namespaces) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Nodes wrapper -type wrappedCoreV1Nodes struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Nodes(inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { - return &wrappedCoreV1Nodes{inner, recorder} -} -func (c *wrappedCoreV1Nodes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NodeList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Nodes) 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) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Nodes) PatchStatus(arg0 context.Context, arg1 string, arg2 []uint8) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("patch_status") - return c.inner.PatchStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Nodes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1PersistentVolumeClaims wrapper -type wrappedCoreV1PersistentVolumeClaims struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1PersistentVolumeClaims(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { - return &wrappedCoreV1PersistentVolumeClaims{inner, recorder} -} -func (c *wrappedCoreV1PersistentVolumeClaims) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeClaimList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1PersistentVolumeClaims) 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) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1PersistentVolumeClaims) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumeClaims) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1PersistentVolumes wrapper -type wrappedCoreV1PersistentVolumes struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1PersistentVolumes(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { - return &wrappedCoreV1PersistentVolumes{inner, recorder} -} -func (c *wrappedCoreV1PersistentVolumes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1PersistentVolumes) 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) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1PersistentVolumes) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PersistentVolumes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1PodTemplates wrapper -type wrappedCoreV1PodTemplates struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1PodTemplates(inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { - return &wrappedCoreV1PodTemplates{inner, recorder} -} -func (c *wrappedCoreV1PodTemplates) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodTemplateApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PodTemplates) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PodTemplates) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PodTemplates) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PodTemplates) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PodTemplates) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodTemplateList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1PodTemplates) 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) (*k8s_io_api_core_v1.PodTemplate, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1PodTemplates) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1PodTemplates) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Pods wrapper -type wrappedCoreV1Pods struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Pods(inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { - return &wrappedCoreV1Pods{inner, recorder} -} -func (c *wrappedCoreV1Pods) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) Bind(arg0 context.Context, arg1 *k8s_io_api_core_v1.Binding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { - defer c.recorder.Record("bind") - return c.inner.Bind(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { - defer c.recorder.Record("evict") - return c.inner.Evict(arg0, arg1) -} -func (c *wrappedCoreV1Pods) EvictV1(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { - defer c.recorder.Record("evict_v1") - return c.inner.EvictV1(arg0, arg1) -} -func (c *wrappedCoreV1Pods) EvictV1beta1(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { - defer c.recorder.Record("evict_v1beta1") - return c.inner.EvictV1beta1(arg0, arg1) -} -func (c *wrappedCoreV1Pods) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) GetLogs(arg0 string, arg1 *k8s_io_api_core_v1.PodLogOptions) *k8s_io_client_go_rest.Request { - defer c.recorder.Record("get_logs") - return c.inner.GetLogs(arg0, arg1) -} -func (c *wrappedCoreV1Pods) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Pods) 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) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Pods) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { - defer c.recorder.Record("proxy_get") - return c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) -} -func (c *wrappedCoreV1Pods) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) UpdateEphemeralContainers(arg0 context.Context, arg1 string, arg2 *k8s_io_api_core_v1.Pod, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("update_ephemeral_containers") - return c.inner.UpdateEphemeralContainers(arg0, arg1, arg2, arg3) -} -func (c *wrappedCoreV1Pods) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Pods) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1ReplicationControllers wrapper -type wrappedCoreV1ReplicationControllers struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1ReplicationControllers(inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { - return &wrappedCoreV1ReplicationControllers{inner, recorder} -} -func (c *wrappedCoreV1ReplicationControllers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ReplicationControllerList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1ReplicationControllers) 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) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1ReplicationControllers) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedCoreV1ReplicationControllers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ReplicationControllers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1ResourceQuotas wrapper -type wrappedCoreV1ResourceQuotas struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1ResourceQuotas(inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { - return &wrappedCoreV1ResourceQuotas{inner, recorder} -} -func (c *wrappedCoreV1ResourceQuotas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ResourceQuotaList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1ResourceQuotas) 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) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1ResourceQuotas) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ResourceQuotas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Secrets wrapper -type wrappedCoreV1Secrets struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Secrets(inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { - return &wrappedCoreV1Secrets{inner, recorder} -} -func (c *wrappedCoreV1Secrets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.SecretApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Secret, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Secrets) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Secret, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Secrets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Secrets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Secrets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Secret, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Secrets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.SecretList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Secrets) 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) (*k8s_io_api_core_v1.Secret, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Secrets) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Secret, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Secrets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1ServiceAccounts wrapper -type wrappedCoreV1ServiceAccounts struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1ServiceAccounts(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { - return &wrappedCoreV1ServiceAccounts{inner, recorder} -} -func (c *wrappedCoreV1ServiceAccounts) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceAccountApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ServiceAccounts) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ServiceAccounts) CreateToken(arg0 context.Context, arg1 string, arg2 *k8s_io_api_authentication_v1.TokenRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenRequest, error) { - defer c.recorder.Record("create_token") - return c.inner.CreateToken(arg0, arg1, arg2, arg3) -} -func (c *wrappedCoreV1ServiceAccounts) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ServiceAccounts) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ServiceAccounts) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ServiceAccounts) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceAccountList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1ServiceAccounts) 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) (*k8s_io_api_core_v1.ServiceAccount, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1ServiceAccounts) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1ServiceAccounts) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedCoreV1Services wrapper -type wrappedCoreV1Services struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newCoreV1Services(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { - return &wrappedCoreV1Services{inner, recorder} -} -func (c *wrappedCoreV1Services) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedCoreV1Services) 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) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedCoreV1Services) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { - defer c.recorder.Record("proxy_get") - return c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) -} -func (c *wrappedCoreV1Services) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedCoreV1Services) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedDiscoveryV1EndpointSlices wrapper -type wrappedDiscoveryV1EndpointSlices struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newDiscoveryV1EndpointSlices(inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { - return &wrappedDiscoveryV1EndpointSlices{inner, recorder} -} -func (c *wrappedDiscoveryV1EndpointSlices) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1EndpointSlices) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1EndpointSlices) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1EndpointSlices) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1EndpointSlices) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1EndpointSlices) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1.EndpointSliceList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedDiscoveryV1EndpointSlices) 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) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedDiscoveryV1EndpointSlices) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1EndpointSlices) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedDiscoveryV1beta1EndpointSlices wrapper -type wrappedDiscoveryV1beta1EndpointSlices struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newDiscoveryV1beta1EndpointSlices(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { - return &wrappedDiscoveryV1beta1EndpointSlices{inner, recorder} -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1beta1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1beta1.EndpointSliceList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) 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) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedEventsV1Events wrapper -type wrappedEventsV1Events struct { - inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newEventsV1Events(inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { - return &wrappedEventsV1Events{inner, recorder} -} -func (c *wrappedEventsV1Events) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1.Event, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedEventsV1Events) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1.Event, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedEventsV1Events) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedEventsV1Events) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedEventsV1Events) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_events_v1.Event, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedEventsV1Events) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1.EventList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedEventsV1Events) 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) (*k8s_io_api_events_v1.Event, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedEventsV1Events) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1.Event, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedEventsV1Events) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedEventsV1beta1Events wrapper -type wrappedEventsV1beta1Events struct { - inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newEventsV1beta1Events(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { - return &wrappedEventsV1beta1Events{inner, recorder} -} -func (c *wrappedEventsV1beta1Events) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1beta1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedEventsV1beta1Events) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedEventsV1beta1Events) CreateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("create_with_event_namespace") - return c.inner.CreateWithEventNamespace(arg0) -} -func (c *wrappedEventsV1beta1Events) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedEventsV1beta1Events) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedEventsV1beta1Events) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedEventsV1beta1Events) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1beta1.EventList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedEventsV1beta1Events) 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) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedEventsV1beta1Events) PatchWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event, arg1 []uint8) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("patch_with_event_namespace") - return c.inner.PatchWithEventNamespace(arg0, arg1) -} -func (c *wrappedEventsV1beta1Events) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedEventsV1beta1Events) UpdateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { - defer c.recorder.Record("update_with_event_namespace") - return c.inner.UpdateWithEventNamespace(arg0) -} -func (c *wrappedEventsV1beta1Events) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedExtensionsV1beta1DaemonSets wrapper -type wrappedExtensionsV1beta1DaemonSets struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newExtensionsV1beta1DaemonSets(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { - return &wrappedExtensionsV1beta1DaemonSets{inner, recorder} -} -func (c *wrappedExtensionsV1beta1DaemonSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DaemonSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedExtensionsV1beta1DaemonSets) 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) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedExtensionsV1beta1DaemonSets) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1DaemonSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedExtensionsV1beta1Deployments wrapper -type wrappedExtensionsV1beta1Deployments struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newExtensionsV1beta1Deployments(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { - return &wrappedExtensionsV1beta1Deployments{inner, recorder} -} -func (c *wrappedExtensionsV1beta1Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - defer c.recorder.Record("apply_scale") - return c.inner.ApplyScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedExtensionsV1beta1Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DeploymentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedExtensionsV1beta1Deployments) 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) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedExtensionsV1beta1Deployments) Rollback(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DeploymentRollback, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { - defer c.recorder.Record("rollback") - return c.inner.Rollback(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedExtensionsV1beta1Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedExtensionsV1beta1Ingresses wrapper -type wrappedExtensionsV1beta1Ingresses struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newExtensionsV1beta1Ingresses(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { - return &wrappedExtensionsV1beta1Ingresses{inner, recorder} -} -func (c *wrappedExtensionsV1beta1Ingresses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.IngressList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedExtensionsV1beta1Ingresses) 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) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedExtensionsV1beta1Ingresses) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1Ingresses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedExtensionsV1beta1NetworkPolicies wrapper -type wrappedExtensionsV1beta1NetworkPolicies struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newExtensionsV1beta1NetworkPolicies(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { - return &wrappedExtensionsV1beta1NetworkPolicies{inner, recorder} -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) 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) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedExtensionsV1beta1PodSecurityPolicies wrapper -type wrappedExtensionsV1beta1PodSecurityPolicies struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newExtensionsV1beta1PodSecurityPolicies(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { - return &wrappedExtensionsV1beta1PodSecurityPolicies{inner, recorder} -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) 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) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedExtensionsV1beta1ReplicaSets wrapper -type wrappedExtensionsV1beta1ReplicaSets struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newExtensionsV1beta1ReplicaSets(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { - return &wrappedExtensionsV1beta1ReplicaSets{inner, recorder} -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - defer c.recorder.Record("apply_scale") - return c.inner.ApplyScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - defer c.recorder.Record("get_scale") - return c.inner.GetScale(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) 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) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - defer c.recorder.Record("update_scale") - return c.inner.UpdateScale(arg0, arg1, arg2, arg3) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedFlowcontrolV1alpha1FlowSchemas wrapper -type wrappedFlowcontrolV1alpha1FlowSchemas struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newFlowcontrolV1alpha1FlowSchemas(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { - return &wrappedFlowcontrolV1alpha1FlowSchemas{inner, recorder} -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchemaList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) 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) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedFlowcontrolV1alpha1PriorityLevelConfigurations wrapper -type wrappedFlowcontrolV1alpha1PriorityLevelConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newFlowcontrolV1alpha1PriorityLevelConfigurations(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { - return &wrappedFlowcontrolV1alpha1PriorityLevelConfigurations{inner, recorder} -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) 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) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedFlowcontrolV1beta1FlowSchemas wrapper -type wrappedFlowcontrolV1beta1FlowSchemas struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newFlowcontrolV1beta1FlowSchemas(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { - return &wrappedFlowcontrolV1beta1FlowSchemas{inner, recorder} -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchemaList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) 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) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedFlowcontrolV1beta1PriorityLevelConfigurations wrapper -type wrappedFlowcontrolV1beta1PriorityLevelConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newFlowcontrolV1beta1PriorityLevelConfigurations(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { - return &wrappedFlowcontrolV1beta1PriorityLevelConfigurations{inner, recorder} -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) 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) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedFlowcontrolV1beta2FlowSchemas wrapper -type wrappedFlowcontrolV1beta2FlowSchemas struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newFlowcontrolV1beta2FlowSchemas(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { - return &wrappedFlowcontrolV1beta2FlowSchemas{inner, recorder} -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchemaList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) 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) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedFlowcontrolV1beta2PriorityLevelConfigurations wrapper -type wrappedFlowcontrolV1beta2PriorityLevelConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newFlowcontrolV1beta2PriorityLevelConfigurations(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { - return &wrappedFlowcontrolV1beta2PriorityLevelConfigurations{inner, recorder} -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfigurationList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) 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) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedInternalV1alpha1StorageVersions wrapper -type wrappedInternalV1alpha1StorageVersions struct { - inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newInternalV1alpha1StorageVersions(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { - return &wrappedInternalV1alpha1StorageVersions{inner, recorder} -} -func (c *wrappedInternalV1alpha1StorageVersions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) Create(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersionList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedInternalV1alpha1StorageVersions) 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) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedInternalV1alpha1StorageVersions) Update(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedInternalV1alpha1StorageVersions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNetworkingV1IngressClasses wrapper -type wrappedNetworkingV1IngressClasses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNetworkingV1IngressClasses(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { - return &wrappedNetworkingV1IngressClasses{inner, recorder} -} -func (c *wrappedNetworkingV1IngressClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1IngressClasses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1IngressClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1IngressClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1IngressClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1IngressClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNetworkingV1IngressClasses) 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) (*k8s_io_api_networking_v1.IngressClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNetworkingV1IngressClasses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1IngressClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNetworkingV1Ingresses wrapper -type wrappedNetworkingV1Ingresses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNetworkingV1Ingresses(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { - return &wrappedNetworkingV1Ingresses{inner, recorder} -} -func (c *wrappedNetworkingV1Ingresses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNetworkingV1Ingresses) 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) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNetworkingV1Ingresses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1Ingresses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNetworkingV1NetworkPolicies wrapper -type wrappedNetworkingV1NetworkPolicies struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNetworkingV1NetworkPolicies(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { - return &wrappedNetworkingV1NetworkPolicies{inner, recorder} -} -func (c *wrappedNetworkingV1NetworkPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.NetworkPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNetworkingV1NetworkPolicies) 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) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNetworkingV1NetworkPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1NetworkPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNetworkingV1alpha1ClusterCIDRs wrapper -type wrappedNetworkingV1alpha1ClusterCIDRs struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNetworkingV1alpha1ClusterCIDRs(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { - return &wrappedNetworkingV1alpha1ClusterCIDRs{inner, recorder} -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1alpha1.ClusterCIDRApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDRList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) 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) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNetworkingV1beta1IngressClasses wrapper -type wrappedNetworkingV1beta1IngressClasses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNetworkingV1beta1IngressClasses(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { - return &wrappedNetworkingV1beta1IngressClasses{inner, recorder} -} -func (c *wrappedNetworkingV1beta1IngressClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1IngressClasses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1IngressClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1IngressClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1IngressClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1IngressClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNetworkingV1beta1IngressClasses) 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) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNetworkingV1beta1IngressClasses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1IngressClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNetworkingV1beta1Ingresses wrapper -type wrappedNetworkingV1beta1Ingresses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNetworkingV1beta1Ingresses(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { - return &wrappedNetworkingV1beta1Ingresses{inner, recorder} -} -func (c *wrappedNetworkingV1beta1Ingresses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNetworkingV1beta1Ingresses) 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) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNetworkingV1beta1Ingresses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedNetworkingV1beta1Ingresses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNodeV1RuntimeClasses wrapper -type wrappedNodeV1RuntimeClasses struct { - inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNodeV1RuntimeClasses(inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { - return &wrappedNodeV1RuntimeClasses{inner, recorder} -} -func (c *wrappedNodeV1RuntimeClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNodeV1RuntimeClasses) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNodeV1RuntimeClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNodeV1RuntimeClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNodeV1RuntimeClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNodeV1RuntimeClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1.RuntimeClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNodeV1RuntimeClasses) 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) (*k8s_io_api_node_v1.RuntimeClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNodeV1RuntimeClasses) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNodeV1RuntimeClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNodeV1alpha1RuntimeClasses wrapper -type wrappedNodeV1alpha1RuntimeClasses struct { - inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNodeV1alpha1RuntimeClasses(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { - return &wrappedNodeV1alpha1RuntimeClasses{inner, recorder} -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1alpha1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1alpha1.RuntimeClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) 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) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedNodeV1beta1RuntimeClasses wrapper -type wrappedNodeV1beta1RuntimeClasses struct { - inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newNodeV1beta1RuntimeClasses(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { - return &wrappedNodeV1beta1RuntimeClasses{inner, recorder} -} -func (c *wrappedNodeV1beta1RuntimeClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1beta1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedNodeV1beta1RuntimeClasses) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedNodeV1beta1RuntimeClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedNodeV1beta1RuntimeClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedNodeV1beta1RuntimeClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedNodeV1beta1RuntimeClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1beta1.RuntimeClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedNodeV1beta1RuntimeClasses) 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) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedNodeV1beta1RuntimeClasses) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedNodeV1beta1RuntimeClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedPolicyV1Evictions wrapper -type wrappedPolicyV1Evictions struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newPolicyV1Evictions(inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { - return &wrappedPolicyV1Evictions{inner, recorder} -} -func (c *wrappedPolicyV1Evictions) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { - defer c.recorder.Record("evict") - return c.inner.Evict(arg0, arg1) -} - -// wrappedPolicyV1PodDisruptionBudgets wrapper -type wrappedPolicyV1PodDisruptionBudgets struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newPolicyV1PodDisruptionBudgets(inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { - return &wrappedPolicyV1PodDisruptionBudgets{inner, recorder} -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1.PodDisruptionBudgetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) 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) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedPolicyV1beta1Evictions wrapper -type wrappedPolicyV1beta1Evictions struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newPolicyV1beta1Evictions(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { - return &wrappedPolicyV1beta1Evictions{inner, recorder} -} -func (c *wrappedPolicyV1beta1Evictions) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { - defer c.recorder.Record("evict") - return c.inner.Evict(arg0, arg1) -} - -// wrappedPolicyV1beta1PodDisruptionBudgets wrapper -type wrappedPolicyV1beta1PodDisruptionBudgets struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newPolicyV1beta1PodDisruptionBudgets(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { - return &wrappedPolicyV1beta1PodDisruptionBudgets{inner, recorder} -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudgetList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) 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) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedPolicyV1beta1PodSecurityPolicies wrapper -type wrappedPolicyV1beta1PodSecurityPolicies struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newPolicyV1beta1PodSecurityPolicies(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { - return &wrappedPolicyV1beta1PodSecurityPolicies{inner, recorder} -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) 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) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1ClusterRoleBindings wrapper -type wrappedRbacV1ClusterRoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1ClusterRoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { - return &wrappedRbacV1ClusterRoleBindings{inner, recorder} -} -func (c *wrappedRbacV1ClusterRoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleBindingList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1ClusterRoleBindings) 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) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1ClusterRoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1ClusterRoles wrapper -type wrappedRbacV1ClusterRoles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1ClusterRoles(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { - return &wrappedRbacV1ClusterRoles{inner, recorder} -} -func (c *wrappedRbacV1ClusterRoles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1ClusterRoles) 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) (*k8s_io_api_rbac_v1.ClusterRole, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1ClusterRoles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1ClusterRoles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1RoleBindings wrapper -type wrappedRbacV1RoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1RoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { - return &wrappedRbacV1RoleBindings{inner, recorder} -} -func (c *wrappedRbacV1RoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1RoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1RoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1RoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1RoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1RoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleBindingList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1RoleBindings) 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) (*k8s_io_api_rbac_v1.RoleBinding, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1RoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1RoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1Roles wrapper -type wrappedRbacV1Roles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1Roles(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { - return &wrappedRbacV1Roles{inner, recorder} -} -func (c *wrappedRbacV1Roles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.Role, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1Roles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.Role, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1Roles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1Roles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1Roles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.Role, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1Roles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1Roles) 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) (*k8s_io_api_rbac_v1.Role, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1Roles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.Role, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1Roles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1alpha1ClusterRoleBindings wrapper -type wrappedRbacV1alpha1ClusterRoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1alpha1ClusterRoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { - return &wrappedRbacV1alpha1ClusterRoleBindings{inner, recorder} -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBindingList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) 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) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1alpha1ClusterRoles wrapper -type wrappedRbacV1alpha1ClusterRoles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1alpha1ClusterRoles(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { - return &wrappedRbacV1alpha1ClusterRoles{inner, recorder} -} -func (c *wrappedRbacV1alpha1ClusterRoles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1alpha1ClusterRoles) 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) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1alpha1ClusterRoles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1ClusterRoles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1alpha1RoleBindings wrapper -type wrappedRbacV1alpha1RoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1alpha1RoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { - return &wrappedRbacV1alpha1RoleBindings{inner, recorder} -} -func (c *wrappedRbacV1alpha1RoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1RoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1RoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1RoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1RoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1RoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleBindingList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1alpha1RoleBindings) 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) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1alpha1RoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1RoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1alpha1Roles wrapper -type wrappedRbacV1alpha1Roles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1alpha1Roles(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { - return &wrappedRbacV1alpha1Roles{inner, recorder} -} -func (c *wrappedRbacV1alpha1Roles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1Roles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1Roles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1Roles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1Roles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1Roles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1alpha1Roles) 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) (*k8s_io_api_rbac_v1alpha1.Role, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1alpha1Roles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1alpha1Roles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1beta1ClusterRoleBindings wrapper -type wrappedRbacV1beta1ClusterRoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1beta1ClusterRoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { - return &wrappedRbacV1beta1ClusterRoleBindings{inner, recorder} -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBindingList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) 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) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1beta1ClusterRoles wrapper -type wrappedRbacV1beta1ClusterRoles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1beta1ClusterRoles(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { - return &wrappedRbacV1beta1ClusterRoles{inner, recorder} -} -func (c *wrappedRbacV1beta1ClusterRoles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1beta1ClusterRoles) 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) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1beta1ClusterRoles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1ClusterRoles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1beta1RoleBindings wrapper -type wrappedRbacV1beta1RoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1beta1RoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { - return &wrappedRbacV1beta1RoleBindings{inner, recorder} -} -func (c *wrappedRbacV1beta1RoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1RoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1RoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1RoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1RoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1RoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleBindingList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1beta1RoleBindings) 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) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1beta1RoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1RoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedRbacV1beta1Roles wrapper -type wrappedRbacV1beta1Roles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newRbacV1beta1Roles(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { - return &wrappedRbacV1beta1Roles{inner, recorder} -} -func (c *wrappedRbacV1beta1Roles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1Roles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1Roles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1Roles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1Roles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1Roles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedRbacV1beta1Roles) 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) (*k8s_io_api_rbac_v1beta1.Role, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedRbacV1beta1Roles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedRbacV1beta1Roles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedSchedulingV1PriorityClasses wrapper -type wrappedSchedulingV1PriorityClasses struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newSchedulingV1PriorityClasses(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { - return &wrappedSchedulingV1PriorityClasses{inner, recorder} -} -func (c *wrappedSchedulingV1PriorityClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1PriorityClasses) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1PriorityClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1PriorityClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1PriorityClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1PriorityClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1.PriorityClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedSchedulingV1PriorityClasses) 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) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedSchedulingV1PriorityClasses) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1PriorityClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedSchedulingV1alpha1PriorityClasses wrapper -type wrappedSchedulingV1alpha1PriorityClasses struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newSchedulingV1alpha1PriorityClasses(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { - return &wrappedSchedulingV1alpha1PriorityClasses{inner, recorder} -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1alpha1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) 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) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedSchedulingV1beta1PriorityClasses wrapper -type wrappedSchedulingV1beta1PriorityClasses struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newSchedulingV1beta1PriorityClasses(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { - return &wrappedSchedulingV1beta1PriorityClasses{inner, recorder} -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1beta1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) 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) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1CSIDrivers wrapper -type wrappedStorageV1CSIDrivers struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1CSIDrivers(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { - return &wrappedStorageV1CSIDrivers{inner, recorder} -} -func (c *wrappedStorageV1CSIDrivers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIDrivers) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIDrivers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIDrivers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIDrivers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIDrivers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIDriverList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1CSIDrivers) 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) (*k8s_io_api_storage_v1.CSIDriver, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1CSIDrivers) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIDrivers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1CSINodes wrapper -type wrappedStorageV1CSINodes struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1CSINodes(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { - return &wrappedStorageV1CSINodes{inner, recorder} -} -func (c *wrappedStorageV1CSINodes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSINode, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSINodes) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSINode, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSINodes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSINodes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSINodes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSINode, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSINodes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSINodeList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1CSINodes) 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) (*k8s_io_api_storage_v1.CSINode, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1CSINodes) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSINode, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSINodes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1CSIStorageCapacities wrapper -type wrappedStorageV1CSIStorageCapacities struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1CSIStorageCapacities(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { - return &wrappedStorageV1CSIStorageCapacities{inner, recorder} -} -func (c *wrappedStorageV1CSIStorageCapacities) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIStorageCapacities) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIStorageCapacities) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIStorageCapacities) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIStorageCapacities) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIStorageCapacities) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIStorageCapacityList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1CSIStorageCapacities) 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) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1CSIStorageCapacities) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1CSIStorageCapacities) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1StorageClasses wrapper -type wrappedStorageV1StorageClasses struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1StorageClasses(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { - return &wrappedStorageV1StorageClasses{inner, recorder} -} -func (c *wrappedStorageV1StorageClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1StorageClasses) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1StorageClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1StorageClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1StorageClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1StorageClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.StorageClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1StorageClasses) 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) (*k8s_io_api_storage_v1.StorageClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1StorageClasses) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1StorageClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1VolumeAttachments wrapper -type wrappedStorageV1VolumeAttachments struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1VolumeAttachments(inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { - return &wrappedStorageV1VolumeAttachments{inner, recorder} -} -func (c *wrappedStorageV1VolumeAttachments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.VolumeAttachmentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1VolumeAttachments) 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) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1VolumeAttachments) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedStorageV1VolumeAttachments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1alpha1CSIStorageCapacities wrapper -type wrappedStorageV1alpha1CSIStorageCapacities struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1alpha1CSIStorageCapacities(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { - return &wrappedStorageV1alpha1CSIStorageCapacities{inner, recorder} -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacityList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) 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) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1alpha1VolumeAttachments wrapper -type wrappedStorageV1alpha1VolumeAttachments struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1alpha1VolumeAttachments(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { - return &wrappedStorageV1alpha1VolumeAttachments{inner, recorder} -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachmentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) 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) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1beta1CSIDrivers wrapper -type wrappedStorageV1beta1CSIDrivers struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1beta1CSIDrivers(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { - return &wrappedStorageV1beta1CSIDrivers{inner, recorder} -} -func (c *wrappedStorageV1beta1CSIDrivers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIDrivers) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIDrivers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIDrivers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIDrivers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIDrivers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIDriverList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1beta1CSIDrivers) 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) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1beta1CSIDrivers) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIDrivers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1beta1CSINodes wrapper -type wrappedStorageV1beta1CSINodes struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1beta1CSINodes(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { - return &wrappedStorageV1beta1CSINodes{inner, recorder} -} -func (c *wrappedStorageV1beta1CSINodes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSINodes) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSINodes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSINodes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSINodes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSINodes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSINodeList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1beta1CSINodes) 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) (*k8s_io_api_storage_v1beta1.CSINode, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1beta1CSINodes) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSINodes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1beta1CSIStorageCapacities wrapper -type wrappedStorageV1beta1CSIStorageCapacities struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1beta1CSIStorageCapacities(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { - return &wrappedStorageV1beta1CSIStorageCapacities{inner, recorder} -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacityList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) 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) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1beta1StorageClasses wrapper -type wrappedStorageV1beta1StorageClasses struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1beta1StorageClasses(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { - return &wrappedStorageV1beta1StorageClasses{inner, recorder} -} -func (c *wrappedStorageV1beta1StorageClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1StorageClasses) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1StorageClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1StorageClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1StorageClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1StorageClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.StorageClassList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1beta1StorageClasses) 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) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1beta1StorageClasses) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1StorageClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedStorageV1beta1VolumeAttachments wrapper -type wrappedStorageV1beta1VolumeAttachments struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newStorageV1beta1VolumeAttachments(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { - return &wrappedStorageV1beta1VolumeAttachments{inner, recorder} -} -func (c *wrappedStorageV1beta1VolumeAttachments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("apply") - return c.inner.Apply(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("apply_status") - return c.inner.ApplyStatus(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachmentList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedStorageV1beta1VolumeAttachments) 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) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedStorageV1beta1VolumeAttachments) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedStorageV1beta1VolumeAttachments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} diff --git a/pkg/clients/middleware/metrics/kyverno/clientset.generated.go b/pkg/clients/middleware/metrics/kyverno/clientset.generated.go deleted file mode 100644 index d5c57f26b0..0000000000 --- a/pkg/clients/middleware/metrics/kyverno/clientset.generated.go +++ /dev/null @@ -1,721 +0,0 @@ -package client - -import ( - context "context" - - github_com_kyverno_kyverno_api_kyverno_v1 "github.com/kyverno/kyverno/api/kyverno/v1" - github_com_kyverno_kyverno_api_kyverno_v1alpha1 "github.com/kyverno/kyverno/api/kyverno/v1alpha1" - github_com_kyverno_kyverno_api_kyverno_v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" - github_com_kyverno_kyverno_api_kyverno_v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" - github_com_kyverno_kyverno_api_policyreport_v1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" - github_com_kyverno_kyverno_pkg_client_clientset_versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha1" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1beta1" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/policyreport/v1alpha2" - github_com_kyverno_kyverno_pkg_metrics "github.com/kyverno/kyverno/pkg/metrics" - k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" - k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" - k8s_io_client_go_discovery "k8s.io/client-go/discovery" - k8s_io_client_go_rest "k8s.io/client-go/rest" -) - -// Wrap -func Wrap(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface, m github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface { - return &clientset{ - inner: inner, - kyvernov1: newKyvernoV1(inner.KyvernoV1(), m, t), - kyvernov1alpha1: newKyvernoV1alpha1(inner.KyvernoV1alpha1(), m, t), - kyvernov1alpha2: newKyvernoV1alpha2(inner.KyvernoV1alpha2(), m, t), - kyvernov1beta1: newKyvernoV1beta1(inner.KyvernoV1beta1(), m, t), - wgpolicyk8sv1alpha2: newWgpolicyk8sV1alpha2(inner.Wgpolicyk8sV1alpha2(), m, t), - } -} - -// clientset wrapper -type clientset struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface - kyvernov1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface - kyvernov1alpha1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface - kyvernov1alpha2 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface - kyvernov1beta1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface - wgpolicyk8sv1alpha2 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface -} - -// Discovery is NOT instrumented -func (c *clientset) Discovery() k8s_io_client_go_discovery.DiscoveryInterface { - return c.inner.Discovery() -} -func (c *clientset) KyvernoV1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { - return c.kyvernov1 -} -func (c *clientset) KyvernoV1alpha1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { - return c.kyvernov1alpha1 -} -func (c *clientset) KyvernoV1alpha2() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { - return c.kyvernov1alpha2 -} -func (c *clientset) KyvernoV1beta1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { - return c.kyvernov1beta1 -} -func (c *clientset) Wgpolicyk8sV1alpha2() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { - return c.wgpolicyk8sv1alpha2 -} - -// wrappedKyvernoV1 wrapper -type wrappedKyvernoV1 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newKyvernoV1(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { - return &wrappedKyvernoV1{inner, metrics, t} -} -func (c *wrappedKyvernoV1) ClusterPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterPolicy", c.clientType) - return newKyvernoV1ClusterPolicies(c.inner.ClusterPolicies(), recorder) -} -func (c *wrappedKyvernoV1) GenerateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "GenerateRequest", c.clientType) - return newKyvernoV1GenerateRequests(c.inner.GenerateRequests(namespace), recorder) -} -func (c *wrappedKyvernoV1) Policies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "Policy", c.clientType) - return newKyvernoV1Policies(c.inner.Policies(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1alpha1 wrapper -type wrappedKyvernoV1alpha1 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newKyvernoV1alpha1(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { - return &wrappedKyvernoV1alpha1{inner, metrics, t} -} -func (c *wrappedKyvernoV1alpha1) CleanupPolicies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "CleanupPolicy", c.clientType) - return newKyvernoV1alpha1CleanupPolicies(c.inner.CleanupPolicies(namespace), recorder) -} -func (c *wrappedKyvernoV1alpha1) ClusterCleanupPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterCleanupPolicy", c.clientType) - return newKyvernoV1alpha1ClusterCleanupPolicies(c.inner.ClusterCleanupPolicies(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1alpha2 wrapper -type wrappedKyvernoV1alpha2 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newKyvernoV1alpha2(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { - return &wrappedKyvernoV1alpha2{inner, metrics, t} -} -func (c *wrappedKyvernoV1alpha2) AdmissionReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "AdmissionReport", c.clientType) - return newKyvernoV1alpha2AdmissionReports(c.inner.AdmissionReports(namespace), recorder) -} -func (c *wrappedKyvernoV1alpha2) BackgroundScanReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "BackgroundScanReport", c.clientType) - return newKyvernoV1alpha2BackgroundScanReports(c.inner.BackgroundScanReports(namespace), recorder) -} -func (c *wrappedKyvernoV1alpha2) ClusterAdmissionReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterAdmissionReport", c.clientType) - return newKyvernoV1alpha2ClusterAdmissionReports(c.inner.ClusterAdmissionReports(), recorder) -} -func (c *wrappedKyvernoV1alpha2) ClusterBackgroundScanReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterBackgroundScanReport", c.clientType) - return newKyvernoV1alpha2ClusterBackgroundScanReports(c.inner.ClusterBackgroundScanReports(), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1alpha2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1beta1 wrapper -type wrappedKyvernoV1beta1 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newKyvernoV1beta1(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { - return &wrappedKyvernoV1beta1{inner, metrics, t} -} -func (c *wrappedKyvernoV1beta1) UpdateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "UpdateRequest", c.clientType) - return newKyvernoV1beta1UpdateRequests(c.inner.UpdateRequests(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedWgpolicyk8sV1alpha2 wrapper -type wrappedWgpolicyk8sV1alpha2 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface - metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager - clientType github_com_kyverno_kyverno_pkg_metrics.ClientType -} - -func newWgpolicyk8sV1alpha2(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface, metrics github_com_kyverno_kyverno_pkg_metrics.MetricsConfigManager, t github_com_kyverno_kyverno_pkg_metrics.ClientType) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { - return &wrappedWgpolicyk8sV1alpha2{inner, metrics, t} -} -func (c *wrappedWgpolicyk8sV1alpha2) ClusterPolicyReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.ClusteredClientQueryRecorder(c.metrics, "ClusterPolicyReport", c.clientType) - return newWgpolicyk8sV1alpha2ClusterPolicyReports(c.inner.ClusterPolicyReports(), recorder) -} -func (c *wrappedWgpolicyk8sV1alpha2) PolicyReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { - recorder := github_com_kyverno_kyverno_pkg_metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "PolicyReport", c.clientType) - return newWgpolicyk8sV1alpha2PolicyReports(c.inner.PolicyReports(namespace), recorder) -} - -// RESTClient is NOT instrumented -func (c *wrappedWgpolicyk8sV1alpha2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1ClusterPolicies wrapper -type wrappedKyvernoV1ClusterPolicies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1ClusterPolicies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { - return &wrappedKyvernoV1ClusterPolicies{inner, recorder} -} -func (c *wrappedKyvernoV1ClusterPolicies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1ClusterPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1ClusterPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1ClusterPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1ClusterPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1ClusterPolicies) 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_v1.ClusterPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1ClusterPolicies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1ClusterPolicies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1ClusterPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1GenerateRequests wrapper -type wrappedKyvernoV1GenerateRequests struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1GenerateRequests(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { - return &wrappedKyvernoV1GenerateRequests{inner, recorder} -} -func (c *wrappedKyvernoV1GenerateRequests) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1GenerateRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1GenerateRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1GenerateRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1GenerateRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequestList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1GenerateRequests) 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_v1.GenerateRequest, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1GenerateRequests) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1GenerateRequests) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1GenerateRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1Policies wrapper -type wrappedKyvernoV1Policies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1Policies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { - return &wrappedKyvernoV1Policies{inner, recorder} -} -func (c *wrappedKyvernoV1Policies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1Policies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1Policies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1Policies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1Policies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.PolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1Policies) 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_v1.Policy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1Policies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1Policies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1Policies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1alpha1CleanupPolicies wrapper -type wrappedKyvernoV1alpha1CleanupPolicies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1alpha1CleanupPolicies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { - return &wrappedKyvernoV1alpha1CleanupPolicies{inner, recorder} -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) 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_v1alpha1.CleanupPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1alpha1ClusterCleanupPolicies wrapper -type wrappedKyvernoV1alpha1ClusterCleanupPolicies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1alpha1ClusterCleanupPolicies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { - return &wrappedKyvernoV1alpha1ClusterCleanupPolicies{inner, recorder} -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicyList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) 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_v1alpha1.ClusterCleanupPolicy, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1alpha2AdmissionReports wrapper -type wrappedKyvernoV1alpha2AdmissionReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1alpha2AdmissionReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { - return &wrappedKyvernoV1alpha2AdmissionReports{inner, recorder} -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReportList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) 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_v1alpha2.AdmissionReport, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1alpha2BackgroundScanReports wrapper -type wrappedKyvernoV1alpha2BackgroundScanReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1alpha2BackgroundScanReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { - return &wrappedKyvernoV1alpha2BackgroundScanReports{inner, recorder} -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReportList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) 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_v1alpha2.BackgroundScanReport, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1alpha2ClusterAdmissionReports wrapper -type wrappedKyvernoV1alpha2ClusterAdmissionReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1alpha2ClusterAdmissionReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { - return &wrappedKyvernoV1alpha2ClusterAdmissionReports{inner, recorder} -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReportList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) 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_v1alpha2.ClusterAdmissionReport, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1alpha2ClusterBackgroundScanReports wrapper -type wrappedKyvernoV1alpha2ClusterBackgroundScanReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1alpha2ClusterBackgroundScanReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { - return &wrappedKyvernoV1alpha2ClusterBackgroundScanReports{inner, recorder} -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReportList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) 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_v1alpha2.ClusterBackgroundScanReport, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedKyvernoV1beta1UpdateRequests wrapper -type wrappedKyvernoV1beta1UpdateRequests struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newKyvernoV1beta1UpdateRequests(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { - return &wrappedKyvernoV1beta1UpdateRequests{inner, recorder} -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequestList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) 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_v1beta1.UpdateRequest, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - defer c.recorder.Record("update_status") - return c.inner.UpdateStatus(arg0, arg1, arg2) -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedWgpolicyk8sV1alpha2ClusterPolicyReports wrapper -type wrappedWgpolicyk8sV1alpha2ClusterPolicyReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newWgpolicyk8sV1alpha2ClusterPolicyReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { - return &wrappedWgpolicyk8sV1alpha2ClusterPolicyReports{inner, recorder} -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReportList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) 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_policyreport_v1alpha2.ClusterPolicyReport, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} - -// wrappedWgpolicyk8sV1alpha2PolicyReports wrapper -type wrappedWgpolicyk8sV1alpha2PolicyReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface - recorder github_com_kyverno_kyverno_pkg_metrics.Recorder -} - -func newWgpolicyk8sV1alpha2PolicyReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface, recorder github_com_kyverno_kyverno_pkg_metrics.Recorder) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { - return &wrappedWgpolicyk8sV1alpha2PolicyReports{inner, recorder} -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { - defer c.recorder.Record("create") - return c.inner.Create(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - defer c.recorder.Record("delete") - return c.inner.Delete(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - defer c.recorder.Record("delete_collection") - return c.inner.DeleteCollection(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { - defer c.recorder.Record("get") - return c.inner.Get(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReportList, error) { - defer c.recorder.Record("list") - return c.inner.List(arg0, arg1) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) 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_policyreport_v1alpha2.PolicyReport, error) { - defer c.recorder.Record("patch") - return c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { - defer c.recorder.Record("update") - return c.inner.Update(arg0, arg1, arg2) -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - defer c.recorder.Record("watch") - return c.inner.Watch(arg0, arg1) -} diff --git a/pkg/clients/middleware/tracing/kube/clientset.generated.go b/pkg/clients/middleware/tracing/kube/clientset.generated.go deleted file mode 100644 index f931d3bb36..0000000000 --- a/pkg/clients/middleware/tracing/kube/clientset.generated.go +++ /dev/null @@ -1,21060 +0,0 @@ -package client - -import ( - context "context" - - github_com_kyverno_kyverno_pkg_tracing "github.com/kyverno/kyverno/pkg/tracing" - go_opentelemetry_io_otel_attribute "go.opentelemetry.io/otel/attribute" - go_opentelemetry_io_otel_codes "go.opentelemetry.io/otel/codes" - k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" - k8s_io_api_admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1" - k8s_io_api_apiserverinternal_v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" - k8s_io_api_apps_v1 "k8s.io/api/apps/v1" - k8s_io_api_apps_v1beta1 "k8s.io/api/apps/v1beta1" - k8s_io_api_apps_v1beta2 "k8s.io/api/apps/v1beta2" - k8s_io_api_authentication_v1 "k8s.io/api/authentication/v1" - k8s_io_api_authentication_v1beta1 "k8s.io/api/authentication/v1beta1" - k8s_io_api_authorization_v1 "k8s.io/api/authorization/v1" - k8s_io_api_authorization_v1beta1 "k8s.io/api/authorization/v1beta1" - k8s_io_api_autoscaling_v1 "k8s.io/api/autoscaling/v1" - k8s_io_api_autoscaling_v2 "k8s.io/api/autoscaling/v2" - k8s_io_api_autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1" - k8s_io_api_autoscaling_v2beta2 "k8s.io/api/autoscaling/v2beta2" - k8s_io_api_batch_v1 "k8s.io/api/batch/v1" - k8s_io_api_batch_v1beta1 "k8s.io/api/batch/v1beta1" - k8s_io_api_certificates_v1 "k8s.io/api/certificates/v1" - k8s_io_api_certificates_v1beta1 "k8s.io/api/certificates/v1beta1" - k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" - k8s_io_api_coordination_v1beta1 "k8s.io/api/coordination/v1beta1" - k8s_io_api_core_v1 "k8s.io/api/core/v1" - k8s_io_api_discovery_v1 "k8s.io/api/discovery/v1" - k8s_io_api_discovery_v1beta1 "k8s.io/api/discovery/v1beta1" - k8s_io_api_events_v1 "k8s.io/api/events/v1" - k8s_io_api_events_v1beta1 "k8s.io/api/events/v1beta1" - k8s_io_api_extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - k8s_io_api_flowcontrol_v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" - k8s_io_api_flowcontrol_v1beta1 "k8s.io/api/flowcontrol/v1beta1" - k8s_io_api_flowcontrol_v1beta2 "k8s.io/api/flowcontrol/v1beta2" - k8s_io_api_networking_v1 "k8s.io/api/networking/v1" - k8s_io_api_networking_v1alpha1 "k8s.io/api/networking/v1alpha1" - k8s_io_api_networking_v1beta1 "k8s.io/api/networking/v1beta1" - k8s_io_api_node_v1 "k8s.io/api/node/v1" - k8s_io_api_node_v1alpha1 "k8s.io/api/node/v1alpha1" - k8s_io_api_node_v1beta1 "k8s.io/api/node/v1beta1" - k8s_io_api_policy_v1 "k8s.io/api/policy/v1" - k8s_io_api_policy_v1beta1 "k8s.io/api/policy/v1beta1" - k8s_io_api_rbac_v1 "k8s.io/api/rbac/v1" - k8s_io_api_rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" - k8s_io_api_rbac_v1beta1 "k8s.io/api/rbac/v1beta1" - k8s_io_api_scheduling_v1 "k8s.io/api/scheduling/v1" - k8s_io_api_scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1" - k8s_io_api_scheduling_v1beta1 "k8s.io/api/scheduling/v1beta1" - k8s_io_api_storage_v1 "k8s.io/api/storage/v1" - k8s_io_api_storage_v1alpha1 "k8s.io/api/storage/v1alpha1" - k8s_io_api_storage_v1beta1 "k8s.io/api/storage/v1beta1" - k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8s_io_apimachinery_pkg_fields "k8s.io/apimachinery/pkg/fields" - k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime" - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" - k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" - k8s_io_client_go_applyconfigurations_admissionregistration_v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" - k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" - k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1" - k8s_io_client_go_applyconfigurations_apps_v1 "k8s.io/client-go/applyconfigurations/apps/v1" - k8s_io_client_go_applyconfigurations_apps_v1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" - k8s_io_client_go_applyconfigurations_apps_v1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" - k8s_io_client_go_applyconfigurations_autoscaling_v1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" - k8s_io_client_go_applyconfigurations_autoscaling_v2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" - k8s_io_client_go_applyconfigurations_autoscaling_v2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" - k8s_io_client_go_applyconfigurations_autoscaling_v2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" - k8s_io_client_go_applyconfigurations_batch_v1 "k8s.io/client-go/applyconfigurations/batch/v1" - k8s_io_client_go_applyconfigurations_batch_v1beta1 "k8s.io/client-go/applyconfigurations/batch/v1beta1" - k8s_io_client_go_applyconfigurations_certificates_v1 "k8s.io/client-go/applyconfigurations/certificates/v1" - k8s_io_client_go_applyconfigurations_certificates_v1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" - k8s_io_client_go_applyconfigurations_coordination_v1 "k8s.io/client-go/applyconfigurations/coordination/v1" - k8s_io_client_go_applyconfigurations_coordination_v1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" - k8s_io_client_go_applyconfigurations_core_v1 "k8s.io/client-go/applyconfigurations/core/v1" - k8s_io_client_go_applyconfigurations_discovery_v1 "k8s.io/client-go/applyconfigurations/discovery/v1" - k8s_io_client_go_applyconfigurations_discovery_v1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" - k8s_io_client_go_applyconfigurations_events_v1 "k8s.io/client-go/applyconfigurations/events/v1" - k8s_io_client_go_applyconfigurations_events_v1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" - k8s_io_client_go_applyconfigurations_extensions_v1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" - k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" - k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" - k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" - k8s_io_client_go_applyconfigurations_networking_v1 "k8s.io/client-go/applyconfigurations/networking/v1" - k8s_io_client_go_applyconfigurations_networking_v1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - k8s_io_client_go_applyconfigurations_networking_v1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" - k8s_io_client_go_applyconfigurations_node_v1 "k8s.io/client-go/applyconfigurations/node/v1" - k8s_io_client_go_applyconfigurations_node_v1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" - k8s_io_client_go_applyconfigurations_node_v1beta1 "k8s.io/client-go/applyconfigurations/node/v1beta1" - k8s_io_client_go_applyconfigurations_policy_v1 "k8s.io/client-go/applyconfigurations/policy/v1" - k8s_io_client_go_applyconfigurations_policy_v1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" - k8s_io_client_go_applyconfigurations_rbac_v1 "k8s.io/client-go/applyconfigurations/rbac/v1" - k8s_io_client_go_applyconfigurations_rbac_v1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" - k8s_io_client_go_applyconfigurations_rbac_v1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" - k8s_io_client_go_applyconfigurations_scheduling_v1 "k8s.io/client-go/applyconfigurations/scheduling/v1" - k8s_io_client_go_applyconfigurations_scheduling_v1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" - k8s_io_client_go_applyconfigurations_scheduling_v1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" - k8s_io_client_go_applyconfigurations_storage_v1 "k8s.io/client-go/applyconfigurations/storage/v1" - k8s_io_client_go_applyconfigurations_storage_v1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" - k8s_io_client_go_applyconfigurations_storage_v1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" - k8s_io_client_go_discovery "k8s.io/client-go/discovery" - k8s_io_client_go_kubernetes "k8s.io/client-go/kubernetes" - k8s_io_client_go_kubernetes_typed_admissionregistration_v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" - k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" - k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" - k8s_io_client_go_kubernetes_typed_apps_v1 "k8s.io/client-go/kubernetes/typed/apps/v1" - k8s_io_client_go_kubernetes_typed_apps_v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" - k8s_io_client_go_kubernetes_typed_apps_v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" - k8s_io_client_go_kubernetes_typed_authentication_v1 "k8s.io/client-go/kubernetes/typed/authentication/v1" - k8s_io_client_go_kubernetes_typed_authentication_v1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" - k8s_io_client_go_kubernetes_typed_authorization_v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" - k8s_io_client_go_kubernetes_typed_authorization_v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" - k8s_io_client_go_kubernetes_typed_autoscaling_v1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" - k8s_io_client_go_kubernetes_typed_autoscaling_v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" - k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" - k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" - k8s_io_client_go_kubernetes_typed_batch_v1 "k8s.io/client-go/kubernetes/typed/batch/v1" - k8s_io_client_go_kubernetes_typed_batch_v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" - k8s_io_client_go_kubernetes_typed_certificates_v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" - k8s_io_client_go_kubernetes_typed_certificates_v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" - k8s_io_client_go_kubernetes_typed_coordination_v1 "k8s.io/client-go/kubernetes/typed/coordination/v1" - k8s_io_client_go_kubernetes_typed_coordination_v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" - k8s_io_client_go_kubernetes_typed_core_v1 "k8s.io/client-go/kubernetes/typed/core/v1" - k8s_io_client_go_kubernetes_typed_discovery_v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" - k8s_io_client_go_kubernetes_typed_discovery_v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" - k8s_io_client_go_kubernetes_typed_events_v1 "k8s.io/client-go/kubernetes/typed/events/v1" - k8s_io_client_go_kubernetes_typed_events_v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" - k8s_io_client_go_kubernetes_typed_extensions_v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" - k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" - k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" - k8s_io_client_go_kubernetes_typed_networking_v1 "k8s.io/client-go/kubernetes/typed/networking/v1" - k8s_io_client_go_kubernetes_typed_networking_v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - k8s_io_client_go_kubernetes_typed_networking_v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" - k8s_io_client_go_kubernetes_typed_node_v1 "k8s.io/client-go/kubernetes/typed/node/v1" - k8s_io_client_go_kubernetes_typed_node_v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" - k8s_io_client_go_kubernetes_typed_node_v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" - k8s_io_client_go_kubernetes_typed_policy_v1 "k8s.io/client-go/kubernetes/typed/policy/v1" - k8s_io_client_go_kubernetes_typed_policy_v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" - k8s_io_client_go_kubernetes_typed_rbac_v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" - k8s_io_client_go_kubernetes_typed_rbac_v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" - k8s_io_client_go_kubernetes_typed_rbac_v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" - k8s_io_client_go_kubernetes_typed_scheduling_v1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" - k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" - k8s_io_client_go_kubernetes_typed_scheduling_v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" - k8s_io_client_go_kubernetes_typed_storage_v1 "k8s.io/client-go/kubernetes/typed/storage/v1" - k8s_io_client_go_kubernetes_typed_storage_v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" - k8s_io_client_go_kubernetes_typed_storage_v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" - k8s_io_client_go_rest "k8s.io/client-go/rest" -) - -// Wrap -func Wrap(inner k8s_io_client_go_kubernetes.Interface) k8s_io_client_go_kubernetes.Interface { - return &clientset{ - inner: inner, - admissionregistrationv1: newAdmissionregistrationV1(inner.AdmissionregistrationV1()), - admissionregistrationv1beta1: newAdmissionregistrationV1beta1(inner.AdmissionregistrationV1beta1()), - appsv1: newAppsV1(inner.AppsV1()), - appsv1beta1: newAppsV1beta1(inner.AppsV1beta1()), - appsv1beta2: newAppsV1beta2(inner.AppsV1beta2()), - authenticationv1: newAuthenticationV1(inner.AuthenticationV1()), - authenticationv1beta1: newAuthenticationV1beta1(inner.AuthenticationV1beta1()), - authorizationv1: newAuthorizationV1(inner.AuthorizationV1()), - authorizationv1beta1: newAuthorizationV1beta1(inner.AuthorizationV1beta1()), - autoscalingv1: newAutoscalingV1(inner.AutoscalingV1()), - autoscalingv2: newAutoscalingV2(inner.AutoscalingV2()), - autoscalingv2beta1: newAutoscalingV2beta1(inner.AutoscalingV2beta1()), - autoscalingv2beta2: newAutoscalingV2beta2(inner.AutoscalingV2beta2()), - batchv1: newBatchV1(inner.BatchV1()), - batchv1beta1: newBatchV1beta1(inner.BatchV1beta1()), - certificatesv1: newCertificatesV1(inner.CertificatesV1()), - certificatesv1beta1: newCertificatesV1beta1(inner.CertificatesV1beta1()), - coordinationv1: newCoordinationV1(inner.CoordinationV1()), - coordinationv1beta1: newCoordinationV1beta1(inner.CoordinationV1beta1()), - corev1: newCoreV1(inner.CoreV1()), - discoveryv1: newDiscoveryV1(inner.DiscoveryV1()), - discoveryv1beta1: newDiscoveryV1beta1(inner.DiscoveryV1beta1()), - eventsv1: newEventsV1(inner.EventsV1()), - eventsv1beta1: newEventsV1beta1(inner.EventsV1beta1()), - extensionsv1beta1: newExtensionsV1beta1(inner.ExtensionsV1beta1()), - flowcontrolv1alpha1: newFlowcontrolV1alpha1(inner.FlowcontrolV1alpha1()), - flowcontrolv1beta1: newFlowcontrolV1beta1(inner.FlowcontrolV1beta1()), - flowcontrolv1beta2: newFlowcontrolV1beta2(inner.FlowcontrolV1beta2()), - internalv1alpha1: newInternalV1alpha1(inner.InternalV1alpha1()), - networkingv1: newNetworkingV1(inner.NetworkingV1()), - networkingv1alpha1: newNetworkingV1alpha1(inner.NetworkingV1alpha1()), - networkingv1beta1: newNetworkingV1beta1(inner.NetworkingV1beta1()), - nodev1: newNodeV1(inner.NodeV1()), - nodev1alpha1: newNodeV1alpha1(inner.NodeV1alpha1()), - nodev1beta1: newNodeV1beta1(inner.NodeV1beta1()), - policyv1: newPolicyV1(inner.PolicyV1()), - policyv1beta1: newPolicyV1beta1(inner.PolicyV1beta1()), - rbacv1: newRbacV1(inner.RbacV1()), - rbacv1alpha1: newRbacV1alpha1(inner.RbacV1alpha1()), - rbacv1beta1: newRbacV1beta1(inner.RbacV1beta1()), - schedulingv1: newSchedulingV1(inner.SchedulingV1()), - schedulingv1alpha1: newSchedulingV1alpha1(inner.SchedulingV1alpha1()), - schedulingv1beta1: newSchedulingV1beta1(inner.SchedulingV1beta1()), - storagev1: newStorageV1(inner.StorageV1()), - storagev1alpha1: newStorageV1alpha1(inner.StorageV1alpha1()), - storagev1beta1: newStorageV1beta1(inner.StorageV1beta1()), - } -} - -// clientset wrapper -type clientset struct { - inner k8s_io_client_go_kubernetes.Interface - admissionregistrationv1 k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface - admissionregistrationv1beta1 k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface - appsv1 k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface - appsv1beta1 k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface - appsv1beta2 k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface - authenticationv1 k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface - authenticationv1beta1 k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface - authorizationv1 k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface - authorizationv1beta1 k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface - autoscalingv1 k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface - autoscalingv2 k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface - autoscalingv2beta1 k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface - autoscalingv2beta2 k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface - batchv1 k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface - batchv1beta1 k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface - certificatesv1 k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface - certificatesv1beta1 k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface - coordinationv1 k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface - coordinationv1beta1 k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface - corev1 k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface - discoveryv1 k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface - discoveryv1beta1 k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface - eventsv1 k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface - eventsv1beta1 k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface - extensionsv1beta1 k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface - flowcontrolv1alpha1 k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface - flowcontrolv1beta1 k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface - flowcontrolv1beta2 k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface - internalv1alpha1 k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface - networkingv1 k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface - networkingv1alpha1 k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface - networkingv1beta1 k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface - nodev1 k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface - nodev1alpha1 k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface - nodev1beta1 k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface - policyv1 k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface - policyv1beta1 k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface - rbacv1 k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface - rbacv1alpha1 k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface - rbacv1beta1 k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface - schedulingv1 k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface - schedulingv1alpha1 k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface - schedulingv1beta1 k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface - storagev1 k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface - storagev1alpha1 k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface - storagev1beta1 k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface -} - -// Discovery is NOT instrumented -func (c *clientset) Discovery() k8s_io_client_go_discovery.DiscoveryInterface { - return c.inner.Discovery() -} -func (c *clientset) AdmissionregistrationV1() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { - return c.admissionregistrationv1 -} -func (c *clientset) AdmissionregistrationV1beta1() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { - return c.admissionregistrationv1beta1 -} -func (c *clientset) AppsV1() k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { - return c.appsv1 -} -func (c *clientset) AppsV1beta1() k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { - return c.appsv1beta1 -} -func (c *clientset) AppsV1beta2() k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { - return c.appsv1beta2 -} -func (c *clientset) AuthenticationV1() k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { - return c.authenticationv1 -} -func (c *clientset) AuthenticationV1beta1() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { - return c.authenticationv1beta1 -} -func (c *clientset) AuthorizationV1() k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { - return c.authorizationv1 -} -func (c *clientset) AuthorizationV1beta1() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { - return c.authorizationv1beta1 -} -func (c *clientset) AutoscalingV1() k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { - return c.autoscalingv1 -} -func (c *clientset) AutoscalingV2() k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { - return c.autoscalingv2 -} -func (c *clientset) AutoscalingV2beta1() k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { - return c.autoscalingv2beta1 -} -func (c *clientset) AutoscalingV2beta2() k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { - return c.autoscalingv2beta2 -} -func (c *clientset) BatchV1() k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { - return c.batchv1 -} -func (c *clientset) BatchV1beta1() k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { - return c.batchv1beta1 -} -func (c *clientset) CertificatesV1() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { - return c.certificatesv1 -} -func (c *clientset) CertificatesV1beta1() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { - return c.certificatesv1beta1 -} -func (c *clientset) CoordinationV1() k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { - return c.coordinationv1 -} -func (c *clientset) CoordinationV1beta1() k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { - return c.coordinationv1beta1 -} -func (c *clientset) CoreV1() k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { - return c.corev1 -} -func (c *clientset) DiscoveryV1() k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { - return c.discoveryv1 -} -func (c *clientset) DiscoveryV1beta1() k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { - return c.discoveryv1beta1 -} -func (c *clientset) EventsV1() k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { - return c.eventsv1 -} -func (c *clientset) EventsV1beta1() k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { - return c.eventsv1beta1 -} -func (c *clientset) ExtensionsV1beta1() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { - return c.extensionsv1beta1 -} -func (c *clientset) FlowcontrolV1alpha1() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { - return c.flowcontrolv1alpha1 -} -func (c *clientset) FlowcontrolV1beta1() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { - return c.flowcontrolv1beta1 -} -func (c *clientset) FlowcontrolV1beta2() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { - return c.flowcontrolv1beta2 -} -func (c *clientset) InternalV1alpha1() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { - return c.internalv1alpha1 -} -func (c *clientset) NetworkingV1() k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { - return c.networkingv1 -} -func (c *clientset) NetworkingV1alpha1() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { - return c.networkingv1alpha1 -} -func (c *clientset) NetworkingV1beta1() k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { - return c.networkingv1beta1 -} -func (c *clientset) NodeV1() k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { - return c.nodev1 -} -func (c *clientset) NodeV1alpha1() k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { - return c.nodev1alpha1 -} -func (c *clientset) NodeV1beta1() k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { - return c.nodev1beta1 -} -func (c *clientset) PolicyV1() k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { - return c.policyv1 -} -func (c *clientset) PolicyV1beta1() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { - return c.policyv1beta1 -} -func (c *clientset) RbacV1() k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { - return c.rbacv1 -} -func (c *clientset) RbacV1alpha1() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { - return c.rbacv1alpha1 -} -func (c *clientset) RbacV1beta1() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { - return c.rbacv1beta1 -} -func (c *clientset) SchedulingV1() k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { - return c.schedulingv1 -} -func (c *clientset) SchedulingV1alpha1() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { - return c.schedulingv1alpha1 -} -func (c *clientset) SchedulingV1beta1() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { - return c.schedulingv1beta1 -} -func (c *clientset) StorageV1() k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { - return c.storagev1 -} -func (c *clientset) StorageV1alpha1() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { - return c.storagev1alpha1 -} -func (c *clientset) StorageV1beta1() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { - return c.storagev1beta1 -} - -// wrappedAdmissionregistrationV1 wrapper -type wrappedAdmissionregistrationV1 struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface -} - -func newAdmissionregistrationV1(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.AdmissionregistrationV1Interface { - return &wrappedAdmissionregistrationV1{inner} -} -func (c *wrappedAdmissionregistrationV1) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { - return newAdmissionregistrationV1MutatingWebhookConfigurations(c.inner.MutatingWebhookConfigurations()) -} -func (c *wrappedAdmissionregistrationV1) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { - return newAdmissionregistrationV1ValidatingWebhookConfigurations(c.inner.ValidatingWebhookConfigurations()) -} - -// RESTClient is NOT instrumented -func (c *wrappedAdmissionregistrationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAdmissionregistrationV1beta1 wrapper -type wrappedAdmissionregistrationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface -} - -func newAdmissionregistrationV1beta1(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.AdmissionregistrationV1beta1Interface { - return &wrappedAdmissionregistrationV1beta1{inner} -} -func (c *wrappedAdmissionregistrationV1beta1) MutatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { - return newAdmissionregistrationV1beta1MutatingWebhookConfigurations(c.inner.MutatingWebhookConfigurations()) -} -func (c *wrappedAdmissionregistrationV1beta1) ValidatingWebhookConfigurations() k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { - return newAdmissionregistrationV1beta1ValidatingWebhookConfigurations(c.inner.ValidatingWebhookConfigurations()) -} - -// RESTClient is NOT instrumented -func (c *wrappedAdmissionregistrationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAppsV1 wrapper -type wrappedAppsV1 struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface -} - -func newAppsV1(inner k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface) k8s_io_client_go_kubernetes_typed_apps_v1.AppsV1Interface { - return &wrappedAppsV1{inner} -} -func (c *wrappedAppsV1) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { - return newAppsV1ControllerRevisions(c.inner.ControllerRevisions(namespace)) -} -func (c *wrappedAppsV1) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { - return newAppsV1DaemonSets(c.inner.DaemonSets(namespace)) -} -func (c *wrappedAppsV1) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { - return newAppsV1Deployments(c.inner.Deployments(namespace)) -} -func (c *wrappedAppsV1) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { - return newAppsV1ReplicaSets(c.inner.ReplicaSets(namespace)) -} -func (c *wrappedAppsV1) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { - return newAppsV1StatefulSets(c.inner.StatefulSets(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAppsV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAppsV1beta1 wrapper -type wrappedAppsV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface -} - -func newAppsV1beta1(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface) k8s_io_client_go_kubernetes_typed_apps_v1beta1.AppsV1beta1Interface { - return &wrappedAppsV1beta1{inner} -} -func (c *wrappedAppsV1beta1) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { - return newAppsV1beta1ControllerRevisions(c.inner.ControllerRevisions(namespace)) -} -func (c *wrappedAppsV1beta1) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { - return newAppsV1beta1Deployments(c.inner.Deployments(namespace)) -} -func (c *wrappedAppsV1beta1) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { - return newAppsV1beta1StatefulSets(c.inner.StatefulSets(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAppsV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAppsV1beta2 wrapper -type wrappedAppsV1beta2 struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface -} - -func newAppsV1beta2(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface) k8s_io_client_go_kubernetes_typed_apps_v1beta2.AppsV1beta2Interface { - return &wrappedAppsV1beta2{inner} -} -func (c *wrappedAppsV1beta2) ControllerRevisions(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { - return newAppsV1beta2ControllerRevisions(c.inner.ControllerRevisions(namespace)) -} -func (c *wrappedAppsV1beta2) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { - return newAppsV1beta2DaemonSets(c.inner.DaemonSets(namespace)) -} -func (c *wrappedAppsV1beta2) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { - return newAppsV1beta2Deployments(c.inner.Deployments(namespace)) -} -func (c *wrappedAppsV1beta2) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { - return newAppsV1beta2ReplicaSets(c.inner.ReplicaSets(namespace)) -} -func (c *wrappedAppsV1beta2) StatefulSets(namespace string) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { - return newAppsV1beta2StatefulSets(c.inner.StatefulSets(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAppsV1beta2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthenticationV1 wrapper -type wrappedAuthenticationV1 struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface -} - -func newAuthenticationV1(inner k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface) k8s_io_client_go_kubernetes_typed_authentication_v1.AuthenticationV1Interface { - return &wrappedAuthenticationV1{inner} -} -func (c *wrappedAuthenticationV1) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { - return newAuthenticationV1TokenReviews(c.inner.TokenReviews()) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthenticationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthenticationV1beta1 wrapper -type wrappedAuthenticationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface -} - -func newAuthenticationV1beta1(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.AuthenticationV1beta1Interface { - return &wrappedAuthenticationV1beta1{inner} -} -func (c *wrappedAuthenticationV1beta1) TokenReviews() k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { - return newAuthenticationV1beta1TokenReviews(c.inner.TokenReviews()) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthenticationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthorizationV1 wrapper -type wrappedAuthorizationV1 struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface -} - -func newAuthorizationV1(inner k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface) k8s_io_client_go_kubernetes_typed_authorization_v1.AuthorizationV1Interface { - return &wrappedAuthorizationV1{inner} -} -func (c *wrappedAuthorizationV1) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { - return newAuthorizationV1LocalSubjectAccessReviews(c.inner.LocalSubjectAccessReviews(namespace)) -} -func (c *wrappedAuthorizationV1) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { - return newAuthorizationV1SelfSubjectAccessReviews(c.inner.SelfSubjectAccessReviews()) -} -func (c *wrappedAuthorizationV1) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { - return newAuthorizationV1SelfSubjectRulesReviews(c.inner.SelfSubjectRulesReviews()) -} -func (c *wrappedAuthorizationV1) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { - return newAuthorizationV1SubjectAccessReviews(c.inner.SubjectAccessReviews()) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthorizationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAuthorizationV1beta1 wrapper -type wrappedAuthorizationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface -} - -func newAuthorizationV1beta1(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.AuthorizationV1beta1Interface { - return &wrappedAuthorizationV1beta1{inner} -} -func (c *wrappedAuthorizationV1beta1) LocalSubjectAccessReviews(namespace string) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { - return newAuthorizationV1beta1LocalSubjectAccessReviews(c.inner.LocalSubjectAccessReviews(namespace)) -} -func (c *wrappedAuthorizationV1beta1) SelfSubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { - return newAuthorizationV1beta1SelfSubjectAccessReviews(c.inner.SelfSubjectAccessReviews()) -} -func (c *wrappedAuthorizationV1beta1) SelfSubjectRulesReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { - return newAuthorizationV1beta1SelfSubjectRulesReviews(c.inner.SelfSubjectRulesReviews()) -} -func (c *wrappedAuthorizationV1beta1) SubjectAccessReviews() k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { - return newAuthorizationV1beta1SubjectAccessReviews(c.inner.SubjectAccessReviews()) -} - -// RESTClient is NOT instrumented -func (c *wrappedAuthorizationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV1 wrapper -type wrappedAutoscalingV1 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface -} - -func newAutoscalingV1(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface) k8s_io_client_go_kubernetes_typed_autoscaling_v1.AutoscalingV1Interface { - return &wrappedAutoscalingV1{inner} -} -func (c *wrappedAutoscalingV1) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { - return newAutoscalingV1HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV2 wrapper -type wrappedAutoscalingV2 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface -} - -func newAutoscalingV2(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface) k8s_io_client_go_kubernetes_typed_autoscaling_v2.AutoscalingV2Interface { - return &wrappedAutoscalingV2{inner} -} -func (c *wrappedAutoscalingV2) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { - return newAutoscalingV2HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV2beta1 wrapper -type wrappedAutoscalingV2beta1 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface -} - -func newAutoscalingV2beta1(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.AutoscalingV2beta1Interface { - return &wrappedAutoscalingV2beta1{inner} -} -func (c *wrappedAutoscalingV2beta1) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { - return newAutoscalingV2beta1HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV2beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAutoscalingV2beta2 wrapper -type wrappedAutoscalingV2beta2 struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface -} - -func newAutoscalingV2beta2(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.AutoscalingV2beta2Interface { - return &wrappedAutoscalingV2beta2{inner} -} -func (c *wrappedAutoscalingV2beta2) HorizontalPodAutoscalers(namespace string) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { - return newAutoscalingV2beta2HorizontalPodAutoscalers(c.inner.HorizontalPodAutoscalers(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedAutoscalingV2beta2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedBatchV1 wrapper -type wrappedBatchV1 struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface -} - -func newBatchV1(inner k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface) k8s_io_client_go_kubernetes_typed_batch_v1.BatchV1Interface { - return &wrappedBatchV1{inner} -} -func (c *wrappedBatchV1) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { - return newBatchV1CronJobs(c.inner.CronJobs(namespace)) -} -func (c *wrappedBatchV1) Jobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { - return newBatchV1Jobs(c.inner.Jobs(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedBatchV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedBatchV1beta1 wrapper -type wrappedBatchV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface -} - -func newBatchV1beta1(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface) k8s_io_client_go_kubernetes_typed_batch_v1beta1.BatchV1beta1Interface { - return &wrappedBatchV1beta1{inner} -} -func (c *wrappedBatchV1beta1) CronJobs(namespace string) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { - return newBatchV1beta1CronJobs(c.inner.CronJobs(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedBatchV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCertificatesV1 wrapper -type wrappedCertificatesV1 struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface -} - -func newCertificatesV1(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificatesV1Interface { - return &wrappedCertificatesV1{inner} -} -func (c *wrappedCertificatesV1) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { - return newCertificatesV1CertificateSigningRequests(c.inner.CertificateSigningRequests()) -} - -// RESTClient is NOT instrumented -func (c *wrappedCertificatesV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCertificatesV1beta1 wrapper -type wrappedCertificatesV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface -} - -func newCertificatesV1beta1(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificatesV1beta1Interface { - return &wrappedCertificatesV1beta1{inner} -} -func (c *wrappedCertificatesV1beta1) CertificateSigningRequests() k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { - return newCertificatesV1beta1CertificateSigningRequests(c.inner.CertificateSigningRequests()) -} - -// RESTClient is NOT instrumented -func (c *wrappedCertificatesV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCoordinationV1 wrapper -type wrappedCoordinationV1 struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface -} - -func newCoordinationV1(inner k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface) k8s_io_client_go_kubernetes_typed_coordination_v1.CoordinationV1Interface { - return &wrappedCoordinationV1{inner} -} -func (c *wrappedCoordinationV1) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { - return newCoordinationV1Leases(c.inner.Leases(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedCoordinationV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCoordinationV1beta1 wrapper -type wrappedCoordinationV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface -} - -func newCoordinationV1beta1(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.CoordinationV1beta1Interface { - return &wrappedCoordinationV1beta1{inner} -} -func (c *wrappedCoordinationV1beta1) Leases(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { - return newCoordinationV1beta1Leases(c.inner.Leases(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedCoordinationV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedCoreV1 wrapper -type wrappedCoreV1 struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface -} - -func newCoreV1(inner k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface) k8s_io_client_go_kubernetes_typed_core_v1.CoreV1Interface { - return &wrappedCoreV1{inner} -} -func (c *wrappedCoreV1) ComponentStatuses() k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { - return newCoreV1ComponentStatuses(c.inner.ComponentStatuses()) -} -func (c *wrappedCoreV1) ConfigMaps(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { - return newCoreV1ConfigMaps(c.inner.ConfigMaps(namespace)) -} -func (c *wrappedCoreV1) Endpoints(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { - return newCoreV1Endpoints(c.inner.Endpoints(namespace)) -} -func (c *wrappedCoreV1) Events(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { - return newCoreV1Events(c.inner.Events(namespace)) -} -func (c *wrappedCoreV1) LimitRanges(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { - return newCoreV1LimitRanges(c.inner.LimitRanges(namespace)) -} -func (c *wrappedCoreV1) Namespaces() k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { - return newCoreV1Namespaces(c.inner.Namespaces()) -} -func (c *wrappedCoreV1) Nodes() k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { - return newCoreV1Nodes(c.inner.Nodes()) -} -func (c *wrappedCoreV1) PersistentVolumeClaims(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { - return newCoreV1PersistentVolumeClaims(c.inner.PersistentVolumeClaims(namespace)) -} -func (c *wrappedCoreV1) PersistentVolumes() k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { - return newCoreV1PersistentVolumes(c.inner.PersistentVolumes()) -} -func (c *wrappedCoreV1) PodTemplates(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { - return newCoreV1PodTemplates(c.inner.PodTemplates(namespace)) -} -func (c *wrappedCoreV1) Pods(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { - return newCoreV1Pods(c.inner.Pods(namespace)) -} -func (c *wrappedCoreV1) ReplicationControllers(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { - return newCoreV1ReplicationControllers(c.inner.ReplicationControllers(namespace)) -} -func (c *wrappedCoreV1) ResourceQuotas(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { - return newCoreV1ResourceQuotas(c.inner.ResourceQuotas(namespace)) -} -func (c *wrappedCoreV1) Secrets(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { - return newCoreV1Secrets(c.inner.Secrets(namespace)) -} -func (c *wrappedCoreV1) ServiceAccounts(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { - return newCoreV1ServiceAccounts(c.inner.ServiceAccounts(namespace)) -} -func (c *wrappedCoreV1) Services(namespace string) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { - return newCoreV1Services(c.inner.Services(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedCoreV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedDiscoveryV1 wrapper -type wrappedDiscoveryV1 struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface -} - -func newDiscoveryV1(inner k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface) k8s_io_client_go_kubernetes_typed_discovery_v1.DiscoveryV1Interface { - return &wrappedDiscoveryV1{inner} -} -func (c *wrappedDiscoveryV1) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { - return newDiscoveryV1EndpointSlices(c.inner.EndpointSlices(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedDiscoveryV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedDiscoveryV1beta1 wrapper -type wrappedDiscoveryV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface -} - -func newDiscoveryV1beta1(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.DiscoveryV1beta1Interface { - return &wrappedDiscoveryV1beta1{inner} -} -func (c *wrappedDiscoveryV1beta1) EndpointSlices(namespace string) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { - return newDiscoveryV1beta1EndpointSlices(c.inner.EndpointSlices(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedDiscoveryV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedEventsV1 wrapper -type wrappedEventsV1 struct { - inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface -} - -func newEventsV1(inner k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface) k8s_io_client_go_kubernetes_typed_events_v1.EventsV1Interface { - return &wrappedEventsV1{inner} -} -func (c *wrappedEventsV1) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { - return newEventsV1Events(c.inner.Events(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedEventsV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedEventsV1beta1 wrapper -type wrappedEventsV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface -} - -func newEventsV1beta1(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventsV1beta1Interface { - return &wrappedEventsV1beta1{inner} -} -func (c *wrappedEventsV1beta1) Events(namespace string) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { - return newEventsV1beta1Events(c.inner.Events(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedEventsV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedExtensionsV1beta1 wrapper -type wrappedExtensionsV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface -} - -func newExtensionsV1beta1(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ExtensionsV1beta1Interface { - return &wrappedExtensionsV1beta1{inner} -} -func (c *wrappedExtensionsV1beta1) DaemonSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { - return newExtensionsV1beta1DaemonSets(c.inner.DaemonSets(namespace)) -} -func (c *wrappedExtensionsV1beta1) Deployments(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { - return newExtensionsV1beta1Deployments(c.inner.Deployments(namespace)) -} -func (c *wrappedExtensionsV1beta1) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { - return newExtensionsV1beta1Ingresses(c.inner.Ingresses(namespace)) -} -func (c *wrappedExtensionsV1beta1) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { - return newExtensionsV1beta1NetworkPolicies(c.inner.NetworkPolicies(namespace)) -} -func (c *wrappedExtensionsV1beta1) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { - return newExtensionsV1beta1PodSecurityPolicies(c.inner.PodSecurityPolicies()) -} -func (c *wrappedExtensionsV1beta1) ReplicaSets(namespace string) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { - return newExtensionsV1beta1ReplicaSets(c.inner.ReplicaSets(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedExtensionsV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedFlowcontrolV1alpha1 wrapper -type wrappedFlowcontrolV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface -} - -func newFlowcontrolV1alpha1(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowcontrolV1alpha1Interface { - return &wrappedFlowcontrolV1alpha1{inner} -} -func (c *wrappedFlowcontrolV1alpha1) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { - return newFlowcontrolV1alpha1FlowSchemas(c.inner.FlowSchemas()) -} -func (c *wrappedFlowcontrolV1alpha1) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { - return newFlowcontrolV1alpha1PriorityLevelConfigurations(c.inner.PriorityLevelConfigurations()) -} - -// RESTClient is NOT instrumented -func (c *wrappedFlowcontrolV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedFlowcontrolV1beta1 wrapper -type wrappedFlowcontrolV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface -} - -func newFlowcontrolV1beta1(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowcontrolV1beta1Interface { - return &wrappedFlowcontrolV1beta1{inner} -} -func (c *wrappedFlowcontrolV1beta1) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { - return newFlowcontrolV1beta1FlowSchemas(c.inner.FlowSchemas()) -} -func (c *wrappedFlowcontrolV1beta1) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { - return newFlowcontrolV1beta1PriorityLevelConfigurations(c.inner.PriorityLevelConfigurations()) -} - -// RESTClient is NOT instrumented -func (c *wrappedFlowcontrolV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedFlowcontrolV1beta2 wrapper -type wrappedFlowcontrolV1beta2 struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface -} - -func newFlowcontrolV1beta2(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowcontrolV1beta2Interface { - return &wrappedFlowcontrolV1beta2{inner} -} -func (c *wrappedFlowcontrolV1beta2) FlowSchemas() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { - return newFlowcontrolV1beta2FlowSchemas(c.inner.FlowSchemas()) -} -func (c *wrappedFlowcontrolV1beta2) PriorityLevelConfigurations() k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { - return newFlowcontrolV1beta2PriorityLevelConfigurations(c.inner.PriorityLevelConfigurations()) -} - -// RESTClient is NOT instrumented -func (c *wrappedFlowcontrolV1beta2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedInternalV1alpha1 wrapper -type wrappedInternalV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface -} - -func newInternalV1alpha1(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.InternalV1alpha1Interface { - return &wrappedInternalV1alpha1{inner} -} -func (c *wrappedInternalV1alpha1) StorageVersions() k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { - return newInternalV1alpha1StorageVersions(c.inner.StorageVersions()) -} - -// RESTClient is NOT instrumented -func (c *wrappedInternalV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNetworkingV1 wrapper -type wrappedNetworkingV1 struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface -} - -func newNetworkingV1(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkingV1Interface { - return &wrappedNetworkingV1{inner} -} -func (c *wrappedNetworkingV1) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { - return newNetworkingV1IngressClasses(c.inner.IngressClasses()) -} -func (c *wrappedNetworkingV1) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { - return newNetworkingV1Ingresses(c.inner.Ingresses(namespace)) -} -func (c *wrappedNetworkingV1) NetworkPolicies(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { - return newNetworkingV1NetworkPolicies(c.inner.NetworkPolicies(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedNetworkingV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNetworkingV1alpha1 wrapper -type wrappedNetworkingV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface -} - -func newNetworkingV1alpha1(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.NetworkingV1alpha1Interface { - return &wrappedNetworkingV1alpha1{inner} -} -func (c *wrappedNetworkingV1alpha1) ClusterCIDRs() k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { - return newNetworkingV1alpha1ClusterCIDRs(c.inner.ClusterCIDRs()) -} - -// RESTClient is NOT instrumented -func (c *wrappedNetworkingV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNetworkingV1beta1 wrapper -type wrappedNetworkingV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface -} - -func newNetworkingV1beta1(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface) k8s_io_client_go_kubernetes_typed_networking_v1beta1.NetworkingV1beta1Interface { - return &wrappedNetworkingV1beta1{inner} -} -func (c *wrappedNetworkingV1beta1) IngressClasses() k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { - return newNetworkingV1beta1IngressClasses(c.inner.IngressClasses()) -} -func (c *wrappedNetworkingV1beta1) Ingresses(namespace string) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { - return newNetworkingV1beta1Ingresses(c.inner.Ingresses(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedNetworkingV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNodeV1 wrapper -type wrappedNodeV1 struct { - inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface -} - -func newNodeV1(inner k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface) k8s_io_client_go_kubernetes_typed_node_v1.NodeV1Interface { - return &wrappedNodeV1{inner} -} -func (c *wrappedNodeV1) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { - return newNodeV1RuntimeClasses(c.inner.RuntimeClasses()) -} - -// RESTClient is NOT instrumented -func (c *wrappedNodeV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNodeV1alpha1 wrapper -type wrappedNodeV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface -} - -func newNodeV1alpha1(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface) k8s_io_client_go_kubernetes_typed_node_v1alpha1.NodeV1alpha1Interface { - return &wrappedNodeV1alpha1{inner} -} -func (c *wrappedNodeV1alpha1) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { - return newNodeV1alpha1RuntimeClasses(c.inner.RuntimeClasses()) -} - -// RESTClient is NOT instrumented -func (c *wrappedNodeV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedNodeV1beta1 wrapper -type wrappedNodeV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface -} - -func newNodeV1beta1(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface) k8s_io_client_go_kubernetes_typed_node_v1beta1.NodeV1beta1Interface { - return &wrappedNodeV1beta1{inner} -} -func (c *wrappedNodeV1beta1) RuntimeClasses() k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { - return newNodeV1beta1RuntimeClasses(c.inner.RuntimeClasses()) -} - -// RESTClient is NOT instrumented -func (c *wrappedNodeV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedPolicyV1 wrapper -type wrappedPolicyV1 struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface -} - -func newPolicyV1(inner k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface) k8s_io_client_go_kubernetes_typed_policy_v1.PolicyV1Interface { - return &wrappedPolicyV1{inner} -} -func (c *wrappedPolicyV1) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { - return newPolicyV1Evictions(c.inner.Evictions(namespace)) -} -func (c *wrappedPolicyV1) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { - return newPolicyV1PodDisruptionBudgets(c.inner.PodDisruptionBudgets(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedPolicyV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedPolicyV1beta1 wrapper -type wrappedPolicyV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface -} - -func newPolicyV1beta1(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PolicyV1beta1Interface { - return &wrappedPolicyV1beta1{inner} -} -func (c *wrappedPolicyV1beta1) Evictions(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { - return newPolicyV1beta1Evictions(c.inner.Evictions(namespace)) -} -func (c *wrappedPolicyV1beta1) PodDisruptionBudgets(namespace string) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { - return newPolicyV1beta1PodDisruptionBudgets(c.inner.PodDisruptionBudgets(namespace)) -} -func (c *wrappedPolicyV1beta1) PodSecurityPolicies() k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { - return newPolicyV1beta1PodSecurityPolicies(c.inner.PodSecurityPolicies()) -} - -// RESTClient is NOT instrumented -func (c *wrappedPolicyV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedRbacV1 wrapper -type wrappedRbacV1 struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface -} - -func newRbacV1(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface) k8s_io_client_go_kubernetes_typed_rbac_v1.RbacV1Interface { - return &wrappedRbacV1{inner} -} -func (c *wrappedRbacV1) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { - return newRbacV1ClusterRoleBindings(c.inner.ClusterRoleBindings()) -} -func (c *wrappedRbacV1) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { - return newRbacV1ClusterRoles(c.inner.ClusterRoles()) -} -func (c *wrappedRbacV1) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { - return newRbacV1RoleBindings(c.inner.RoleBindings(namespace)) -} -func (c *wrappedRbacV1) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { - return newRbacV1Roles(c.inner.Roles(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedRbacV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedRbacV1alpha1 wrapper -type wrappedRbacV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface -} - -func newRbacV1alpha1(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RbacV1alpha1Interface { - return &wrappedRbacV1alpha1{inner} -} -func (c *wrappedRbacV1alpha1) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { - return newRbacV1alpha1ClusterRoleBindings(c.inner.ClusterRoleBindings()) -} -func (c *wrappedRbacV1alpha1) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { - return newRbacV1alpha1ClusterRoles(c.inner.ClusterRoles()) -} -func (c *wrappedRbacV1alpha1) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { - return newRbacV1alpha1RoleBindings(c.inner.RoleBindings(namespace)) -} -func (c *wrappedRbacV1alpha1) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { - return newRbacV1alpha1Roles(c.inner.Roles(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedRbacV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedRbacV1beta1 wrapper -type wrappedRbacV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface -} - -func newRbacV1beta1(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RbacV1beta1Interface { - return &wrappedRbacV1beta1{inner} -} -func (c *wrappedRbacV1beta1) ClusterRoleBindings() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { - return newRbacV1beta1ClusterRoleBindings(c.inner.ClusterRoleBindings()) -} -func (c *wrappedRbacV1beta1) ClusterRoles() k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { - return newRbacV1beta1ClusterRoles(c.inner.ClusterRoles()) -} -func (c *wrappedRbacV1beta1) RoleBindings(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { - return newRbacV1beta1RoleBindings(c.inner.RoleBindings(namespace)) -} -func (c *wrappedRbacV1beta1) Roles(namespace string) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { - return newRbacV1beta1Roles(c.inner.Roles(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedRbacV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedSchedulingV1 wrapper -type wrappedSchedulingV1 struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface -} - -func newSchedulingV1(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface) k8s_io_client_go_kubernetes_typed_scheduling_v1.SchedulingV1Interface { - return &wrappedSchedulingV1{inner} -} -func (c *wrappedSchedulingV1) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { - return newSchedulingV1PriorityClasses(c.inner.PriorityClasses()) -} - -// RESTClient is NOT instrumented -func (c *wrappedSchedulingV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedSchedulingV1alpha1 wrapper -type wrappedSchedulingV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface -} - -func newSchedulingV1alpha1(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.SchedulingV1alpha1Interface { - return &wrappedSchedulingV1alpha1{inner} -} -func (c *wrappedSchedulingV1alpha1) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { - return newSchedulingV1alpha1PriorityClasses(c.inner.PriorityClasses()) -} - -// RESTClient is NOT instrumented -func (c *wrappedSchedulingV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedSchedulingV1beta1 wrapper -type wrappedSchedulingV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface -} - -func newSchedulingV1beta1(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.SchedulingV1beta1Interface { - return &wrappedSchedulingV1beta1{inner} -} -func (c *wrappedSchedulingV1beta1) PriorityClasses() k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { - return newSchedulingV1beta1PriorityClasses(c.inner.PriorityClasses()) -} - -// RESTClient is NOT instrumented -func (c *wrappedSchedulingV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedStorageV1 wrapper -type wrappedStorageV1 struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface -} - -func newStorageV1(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface) k8s_io_client_go_kubernetes_typed_storage_v1.StorageV1Interface { - return &wrappedStorageV1{inner} -} -func (c *wrappedStorageV1) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { - return newStorageV1CSIDrivers(c.inner.CSIDrivers()) -} -func (c *wrappedStorageV1) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { - return newStorageV1CSINodes(c.inner.CSINodes()) -} -func (c *wrappedStorageV1) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { - return newStorageV1CSIStorageCapacities(c.inner.CSIStorageCapacities(namespace)) -} -func (c *wrappedStorageV1) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { - return newStorageV1StorageClasses(c.inner.StorageClasses()) -} -func (c *wrappedStorageV1) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { - return newStorageV1VolumeAttachments(c.inner.VolumeAttachments()) -} - -// RESTClient is NOT instrumented -func (c *wrappedStorageV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedStorageV1alpha1 wrapper -type wrappedStorageV1alpha1 struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface -} - -func newStorageV1alpha1(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.StorageV1alpha1Interface { - return &wrappedStorageV1alpha1{inner} -} -func (c *wrappedStorageV1alpha1) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { - return newStorageV1alpha1CSIStorageCapacities(c.inner.CSIStorageCapacities(namespace)) -} -func (c *wrappedStorageV1alpha1) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { - return newStorageV1alpha1VolumeAttachments(c.inner.VolumeAttachments()) -} - -// RESTClient is NOT instrumented -func (c *wrappedStorageV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedStorageV1beta1 wrapper -type wrappedStorageV1beta1 struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface -} - -func newStorageV1beta1(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageV1beta1Interface { - return &wrappedStorageV1beta1{inner} -} -func (c *wrappedStorageV1beta1) CSIDrivers() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { - return newStorageV1beta1CSIDrivers(c.inner.CSIDrivers()) -} -func (c *wrappedStorageV1beta1) CSINodes() k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { - return newStorageV1beta1CSINodes(c.inner.CSINodes()) -} -func (c *wrappedStorageV1beta1) CSIStorageCapacities(namespace string) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { - return newStorageV1beta1CSIStorageCapacities(c.inner.CSIStorageCapacities(namespace)) -} -func (c *wrappedStorageV1beta1) StorageClasses() k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { - return newStorageV1beta1StorageClasses(c.inner.StorageClasses()) -} -func (c *wrappedStorageV1beta1) VolumeAttachments() k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { - return newStorageV1beta1VolumeAttachments(c.inner.VolumeAttachments()) -} - -// RESTClient is NOT instrumented -func (c *wrappedStorageV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedAdmissionregistrationV1MutatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1MutatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface -} - -func newAdmissionregistrationV1MutatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.MutatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1MutatingWebhookConfigurations{inner} -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1MutatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/MutatingWebhookConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAdmissionregistrationV1ValidatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1ValidatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface -} - -func newAdmissionregistrationV1ValidatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface) k8s_io_client_go_kubernetes_typed_admissionregistration_v1.ValidatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1ValidatingWebhookConfigurations{inner} -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1ValidatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1/ValidatingWebhookConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface -} - -func newAdmissionregistrationV1beta1MutatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.MutatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations{inner} -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.MutatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.MutatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1MutatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/MutatingWebhookConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "MutatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "MutatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations wrapper -type wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface -} - -func newAdmissionregistrationV1beta1ValidatingWebhookConfigurations(inner k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface) k8s_io_client_go_kubernetes_typed_admissionregistration_v1beta1.ValidatingWebhookConfigurationInterface { - return &wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations{inner} -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_admissionregistration_v1beta1.ValidatingWebhookConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) 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) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_admissionregistration_v1beta1.ValidatingWebhookConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAdmissionregistrationV1beta1ValidatingWebhookConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AdmissionregistrationV1beta1/ValidatingWebhookConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AdmissionregistrationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ValidatingWebhookConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "ValidatingWebhookConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1ControllerRevisions wrapper -type wrappedAppsV1ControllerRevisions struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface -} - -func newAppsV1ControllerRevisions(inner k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface) k8s_io_client_go_kubernetes_typed_apps_v1.ControllerRevisionInterface { - return &wrappedAppsV1ControllerRevisions{inner} -} -func (c *wrappedAppsV1ControllerRevisions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ControllerRevisions) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ControllerRevisions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1ControllerRevisions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1ControllerRevisions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ControllerRevisions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ControllerRevisionList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ControllerRevisions) 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) (*k8s_io_api_apps_v1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ControllerRevisions) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ControllerRevisions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ControllerRevisions/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1DaemonSets wrapper -type wrappedAppsV1DaemonSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface -} - -func newAppsV1DaemonSets(inner k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1.DaemonSetInterface { - return &wrappedAppsV1DaemonSets{inner} -} -func (c *wrappedAppsV1DaemonSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1DaemonSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1DaemonSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DaemonSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) 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) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1DaemonSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/DaemonSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1Deployments wrapper -type wrappedAppsV1Deployments struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface -} - -func newAppsV1Deployments(inner k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface) k8s_io_client_go_kubernetes_typed_apps_v1.DeploymentInterface { - return &wrappedAppsV1Deployments{inner} -} -func (c *wrappedAppsV1Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/ApplyScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.DeploymentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) 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) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/Deployments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1ReplicaSets wrapper -type wrappedAppsV1ReplicaSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface -} - -func newAppsV1ReplicaSets(inner k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1.ReplicaSetInterface { - return &wrappedAppsV1ReplicaSets{inner} -} -func (c *wrappedAppsV1ReplicaSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/ApplyScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1ReplicaSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1ReplicaSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.ReplicaSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) 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) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1ReplicaSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/ReplicaSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1StatefulSets wrapper -type wrappedAppsV1StatefulSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface -} - -func newAppsV1StatefulSets(inner k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1.StatefulSetInterface { - return &wrappedAppsV1StatefulSets{inner} -} -func (c *wrappedAppsV1StatefulSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_autoscaling_v1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/ApplyScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1StatefulSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1StatefulSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1.StatefulSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) 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) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1StatefulSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1/StatefulSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta1ControllerRevisions wrapper -type wrappedAppsV1beta1ControllerRevisions struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface -} - -func newAppsV1beta1ControllerRevisions(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta1.ControllerRevisionInterface { - return &wrappedAppsV1beta1ControllerRevisions{inner} -} -func (c *wrappedAppsV1beta1ControllerRevisions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1ControllerRevisions) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1ControllerRevisions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta1ControllerRevisions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta1ControllerRevisions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1ControllerRevisions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.ControllerRevisionList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1ControllerRevisions) 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) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1ControllerRevisions) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1ControllerRevisions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/ControllerRevisions/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta1Deployments wrapper -type wrappedAppsV1beta1Deployments struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface -} - -func newAppsV1beta1Deployments(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta1.DeploymentInterface { - return &wrappedAppsV1beta1Deployments{inner} -} -func (c *wrappedAppsV1beta1Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta1Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta1Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.DeploymentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) 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) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/Deployments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta1StatefulSets wrapper -type wrappedAppsV1beta1StatefulSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface -} - -func newAppsV1beta1StatefulSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta1.StatefulSetInterface { - return &wrappedAppsV1beta1StatefulSets{inner} -} -func (c *wrappedAppsV1beta1StatefulSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta1.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta1StatefulSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta1StatefulSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta1.StatefulSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) 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) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta1.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta1.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta1StatefulSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta1/StatefulSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta2ControllerRevisions wrapper -type wrappedAppsV1beta2ControllerRevisions struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface -} - -func newAppsV1beta2ControllerRevisions(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ControllerRevisionInterface { - return &wrappedAppsV1beta2ControllerRevisions{inner} -} -func (c *wrappedAppsV1beta2ControllerRevisions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ControllerRevisionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ControllerRevisions) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ControllerRevisions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2ControllerRevisions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2ControllerRevisions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ControllerRevisions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ControllerRevisionList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ControllerRevisions) 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) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ControllerRevisions) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ControllerRevision, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ControllerRevision, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ControllerRevisions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ControllerRevisions/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ControllerRevisions"), - go_opentelemetry_io_otel_attribute.String("kind", "ControllerRevision"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta2DaemonSets wrapper -type wrappedAppsV1beta2DaemonSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface -} - -func newAppsV1beta2DaemonSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DaemonSetInterface { - return &wrappedAppsV1beta2DaemonSets{inner} -} -func (c *wrappedAppsV1beta2DaemonSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2DaemonSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2DaemonSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DaemonSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) 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) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2DaemonSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/DaemonSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta2Deployments wrapper -type wrappedAppsV1beta2Deployments struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface -} - -func newAppsV1beta2Deployments(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta2.DeploymentInterface { - return &wrappedAppsV1beta2Deployments{inner} -} -func (c *wrappedAppsV1beta2Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.DeploymentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) 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) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/Deployments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta2ReplicaSets wrapper -type wrappedAppsV1beta2ReplicaSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface -} - -func newAppsV1beta2ReplicaSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta2.ReplicaSetInterface { - return &wrappedAppsV1beta2ReplicaSets{inner} -} -func (c *wrappedAppsV1beta2ReplicaSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2ReplicaSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2ReplicaSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.ReplicaSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) 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) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2ReplicaSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/ReplicaSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAppsV1beta2StatefulSets wrapper -type wrappedAppsV1beta2StatefulSets struct { - inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface -} - -func newAppsV1beta2StatefulSets(inner k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface) k8s_io_client_go_kubernetes_typed_apps_v1beta2.StatefulSetInterface { - return &wrappedAppsV1beta2StatefulSets{inner} -} -func (c *wrappedAppsV1beta2StatefulSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_apps_v1beta2.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/ApplyScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apps_v1beta2.StatefulSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) Create(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2StatefulSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAppsV1beta2StatefulSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apps_v1beta2.StatefulSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/List", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) 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) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) Update(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_apps_v1beta2.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apps_v1beta2.StatefulSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apps_v1beta2.StatefulSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAppsV1beta2StatefulSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AppsV1beta2/StatefulSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AppsV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "StatefulSets"), - go_opentelemetry_io_otel_attribute.String("kind", "StatefulSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthenticationV1TokenReviews wrapper -type wrappedAuthenticationV1TokenReviews struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface -} - -func newAuthenticationV1TokenReviews(inner k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface) k8s_io_client_go_kubernetes_typed_authentication_v1.TokenReviewInterface { - return &wrappedAuthenticationV1TokenReviews{inner} -} -func (c *wrappedAuthenticationV1TokenReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthenticationV1/TokenReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthenticationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "TokenReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "TokenReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthenticationV1beta1TokenReviews wrapper -type wrappedAuthenticationV1beta1TokenReviews struct { - inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface -} - -func newAuthenticationV1beta1TokenReviews(inner k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface) k8s_io_client_go_kubernetes_typed_authentication_v1beta1.TokenReviewInterface { - return &wrappedAuthenticationV1beta1TokenReviews{inner} -} -func (c *wrappedAuthenticationV1beta1TokenReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authentication_v1beta1.TokenReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1beta1.TokenReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthenticationV1beta1/TokenReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthenticationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "TokenReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "TokenReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1LocalSubjectAccessReviews wrapper -type wrappedAuthorizationV1LocalSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface -} - -func newAuthorizationV1LocalSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1.LocalSubjectAccessReviewInterface { - return &wrappedAuthorizationV1LocalSubjectAccessReviews{inner} -} -func (c *wrappedAuthorizationV1LocalSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.LocalSubjectAccessReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1/LocalSubjectAccessReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LocalSubjectAccessReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "LocalSubjectAccessReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1SelfSubjectAccessReviews wrapper -type wrappedAuthorizationV1SelfSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface -} - -func newAuthorizationV1SelfSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectAccessReviewInterface { - return &wrappedAuthorizationV1SelfSubjectAccessReviews{inner} -} -func (c *wrappedAuthorizationV1SelfSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectAccessReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1/SelfSubjectAccessReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "SelfSubjectAccessReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "SelfSubjectAccessReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1SelfSubjectRulesReviews wrapper -type wrappedAuthorizationV1SelfSubjectRulesReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface -} - -func newAuthorizationV1SelfSubjectRulesReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1.SelfSubjectRulesReviewInterface { - return &wrappedAuthorizationV1SelfSubjectRulesReviews{inner} -} -func (c *wrappedAuthorizationV1SelfSubjectRulesReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SelfSubjectRulesReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1/SelfSubjectRulesReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "SelfSubjectRulesReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "SelfSubjectRulesReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1SubjectAccessReviews wrapper -type wrappedAuthorizationV1SubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface -} - -func newAuthorizationV1SubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1.SubjectAccessReviewInterface { - return &wrappedAuthorizationV1SubjectAccessReviews{inner} -} -func (c *wrappedAuthorizationV1SubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1.SubjectAccessReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1/SubjectAccessReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "SubjectAccessReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "SubjectAccessReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1beta1LocalSubjectAccessReviews wrapper -type wrappedAuthorizationV1beta1LocalSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface -} - -func newAuthorizationV1beta1LocalSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.LocalSubjectAccessReviewInterface { - return &wrappedAuthorizationV1beta1LocalSubjectAccessReviews{inner} -} -func (c *wrappedAuthorizationV1beta1LocalSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.LocalSubjectAccessReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1beta1/LocalSubjectAccessReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "LocalSubjectAccessReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "LocalSubjectAccessReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1beta1SelfSubjectAccessReviews wrapper -type wrappedAuthorizationV1beta1SelfSubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface -} - -func newAuthorizationV1beta1SelfSubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectAccessReviewInterface { - return &wrappedAuthorizationV1beta1SelfSubjectAccessReviews{inner} -} -func (c *wrappedAuthorizationV1beta1SelfSubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectAccessReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1beta1/SelfSubjectAccessReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "SelfSubjectAccessReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "SelfSubjectAccessReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1beta1SelfSubjectRulesReviews wrapper -type wrappedAuthorizationV1beta1SelfSubjectRulesReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface -} - -func newAuthorizationV1beta1SelfSubjectRulesReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SelfSubjectRulesReviewInterface { - return &wrappedAuthorizationV1beta1SelfSubjectRulesReviews{inner} -} -func (c *wrappedAuthorizationV1beta1SelfSubjectRulesReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SelfSubjectRulesReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1beta1/SelfSubjectRulesReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "SelfSubjectRulesReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "SelfSubjectRulesReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAuthorizationV1beta1SubjectAccessReviews wrapper -type wrappedAuthorizationV1beta1SubjectAccessReviews struct { - inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface -} - -func newAuthorizationV1beta1SubjectAccessReviews(inner k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface) k8s_io_client_go_kubernetes_typed_authorization_v1beta1.SubjectAccessReviewInterface { - return &wrappedAuthorizationV1beta1SubjectAccessReviews{inner} -} -func (c *wrappedAuthorizationV1beta1SubjectAccessReviews) Create(arg0 context.Context, arg1 *k8s_io_api_authorization_v1beta1.SubjectAccessReview, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authorization_v1beta1.SubjectAccessReview, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AuthorizationV1beta1/SubjectAccessReviews/Create", - go_opentelemetry_io_otel_attribute.String("client", "AuthorizationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "SubjectAccessReviews"), - go_opentelemetry_io_otel_attribute.String("kind", "SubjectAccessReview"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAutoscalingV1HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV1HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface -} - -func newAutoscalingV1HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface) k8s_io_client_go_kubernetes_typed_autoscaling_v1.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV1HorizontalPodAutoscalers{inner} -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Create", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Get", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscalerList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/List", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Update", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV1HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV1/HorizontalPodAutoscalers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAutoscalingV2HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV2HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface -} - -func newAutoscalingV2HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface) k8s_io_client_go_kubernetes_typed_autoscaling_v2.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV2HorizontalPodAutoscalers{inner} -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Create", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Get", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscalerList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/List", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Update", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2/HorizontalPodAutoscalers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAutoscalingV2beta1HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV2beta1HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface -} - -func newAutoscalingV2beta1HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta1.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV2beta1HorizontalPodAutoscalers{inner} -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta1.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Create", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Get", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscalerList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/List", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Update", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta1.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta1HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta1/HorizontalPodAutoscalers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedAutoscalingV2beta2HorizontalPodAutoscalers wrapper -type wrappedAutoscalingV2beta2HorizontalPodAutoscalers struct { - inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface -} - -func newAutoscalingV2beta2HorizontalPodAutoscalers(inner k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface) k8s_io_client_go_kubernetes_typed_autoscaling_v2beta2.HorizontalPodAutoscalerInterface { - return &wrappedAutoscalingV2beta2HorizontalPodAutoscalers{inner} -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_autoscaling_v2beta2.HorizontalPodAutoscalerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Create(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Create", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Get", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscalerList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/List", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) 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) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Update(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Update", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v2beta2.HorizontalPodAutoscaler, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedAutoscalingV2beta2HorizontalPodAutoscalers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE AutoscalingV2beta2/HorizontalPodAutoscalers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "AutoscalingV2beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "HorizontalPodAutoscalers"), - go_opentelemetry_io_otel_attribute.String("kind", "HorizontalPodAutoscaler"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedBatchV1CronJobs wrapper -type wrappedBatchV1CronJobs struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface -} - -func newBatchV1CronJobs(inner k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface) k8s_io_client_go_kubernetes_typed_batch_v1.CronJobInterface { - return &wrappedBatchV1CronJobs{inner} -} -func (c *wrappedBatchV1CronJobs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Apply", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Create", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Delete", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedBatchV1CronJobs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedBatchV1CronJobs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Get", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.CronJobList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/List", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) 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) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Patch", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Update", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1CronJobs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/CronJobs/Watch", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedBatchV1Jobs wrapper -type wrappedBatchV1Jobs struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface -} - -func newBatchV1Jobs(inner k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface) k8s_io_client_go_kubernetes_typed_batch_v1.JobInterface { - return &wrappedBatchV1Jobs{inner} -} -func (c *wrappedBatchV1Jobs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Apply", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1.JobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Create", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Delete", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedBatchV1Jobs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedBatchV1Jobs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Get", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1.JobList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/List", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) 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) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Patch", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Update", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1.Job, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1.Job, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1Jobs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1/Jobs/Watch", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Jobs"), - go_opentelemetry_io_otel_attribute.String("kind", "Job"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedBatchV1beta1CronJobs wrapper -type wrappedBatchV1beta1CronJobs struct { - inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface -} - -func newBatchV1beta1CronJobs(inner k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface) k8s_io_client_go_kubernetes_typed_batch_v1beta1.CronJobInterface { - return &wrappedBatchV1beta1CronJobs{inner} -} -func (c *wrappedBatchV1beta1CronJobs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Apply", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_batch_v1beta1.CronJobApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) Create(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Create", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Delete", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedBatchV1beta1CronJobs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedBatchV1beta1CronJobs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Get", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_batch_v1beta1.CronJobList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/List", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) 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) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Patch", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) Update(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Update", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_batch_v1beta1.CronJob, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_batch_v1beta1.CronJob, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedBatchV1beta1CronJobs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE BatchV1beta1/CronJobs/Watch", - go_opentelemetry_io_otel_attribute.String("client", "BatchV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CronJobs"), - go_opentelemetry_io_otel_attribute.String("kind", "CronJob"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCertificatesV1CertificateSigningRequests wrapper -type wrappedCertificatesV1CertificateSigningRequests struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface -} - -func newCertificatesV1CertificateSigningRequests(inner k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface) k8s_io_client_go_kubernetes_typed_certificates_v1.CertificateSigningRequestInterface { - return &wrappedCertificatesV1CertificateSigningRequests{inner} -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Create", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Get", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequestList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/List", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) 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) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Update", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) UpdateApproval(arg0 context.Context, arg1 string, arg2 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/UpdateApproval", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateApproval(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1CertificateSigningRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1/CertificateSigningRequests/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCertificatesV1beta1CertificateSigningRequests wrapper -type wrappedCertificatesV1beta1CertificateSigningRequests struct { - inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface -} - -func newCertificatesV1beta1CertificateSigningRequests(inner k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface) k8s_io_client_go_kubernetes_typed_certificates_v1beta1.CertificateSigningRequestInterface { - return &wrappedCertificatesV1beta1CertificateSigningRequests{inner} -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_certificates_v1beta1.CertificateSigningRequestApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Create(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Create", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Get", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequestList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/List", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) 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) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Update(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Update", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) UpdateApproval(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/UpdateApproval", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateApproval(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_certificates_v1beta1.CertificateSigningRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_certificates_v1beta1.CertificateSigningRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCertificatesV1beta1CertificateSigningRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CertificatesV1beta1/CertificateSigningRequests/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CertificatesV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CertificateSigningRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "CertificateSigningRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoordinationV1Leases wrapper -type wrappedCoordinationV1Leases struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface -} - -func newCoordinationV1Leases(inner k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface) k8s_io_client_go_kubernetes_typed_coordination_v1.LeaseInterface { - return &wrappedCoordinationV1Leases{inner} -} -func (c *wrappedCoordinationV1Leases) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1Leases) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1Leases) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoordinationV1Leases) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoordinationV1Leases) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_coordination_v1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1Leases) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1.LeaseList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/List", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1Leases) 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) (*k8s_io_api_coordination_v1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1Leases) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1Leases) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1/Leases/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoordinationV1beta1Leases wrapper -type wrappedCoordinationV1beta1Leases struct { - inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface -} - -func newCoordinationV1beta1Leases(inner k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface) k8s_io_client_go_kubernetes_typed_coordination_v1beta1.LeaseInterface { - return &wrappedCoordinationV1beta1Leases{inner} -} -func (c *wrappedCoordinationV1beta1Leases) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_coordination_v1beta1.LeaseApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1beta1Leases) Create(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1beta1Leases) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoordinationV1beta1Leases) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoordinationV1beta1Leases) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1beta1Leases) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_coordination_v1beta1.LeaseList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/List", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1beta1Leases) 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) (*k8s_io_api_coordination_v1beta1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1beta1Leases) Update(arg0 context.Context, arg1 *k8s_io_api_coordination_v1beta1.Lease, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_coordination_v1beta1.Lease, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoordinationV1beta1Leases) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoordinationV1beta1/Leases/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoordinationV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Leases"), - go_opentelemetry_io_otel_attribute.String("kind", "Lease"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1ComponentStatuses wrapper -type wrappedCoreV1ComponentStatuses struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface -} - -func newCoreV1ComponentStatuses(inner k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface) k8s_io_client_go_kubernetes_typed_core_v1.ComponentStatusInterface { - return &wrappedCoreV1ComponentStatuses{inner} -} -func (c *wrappedCoreV1ComponentStatuses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ComponentStatusApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ComponentStatuses) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ComponentStatuses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ComponentStatuses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ComponentStatuses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ComponentStatuses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ComponentStatusList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ComponentStatuses) 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) (*k8s_io_api_core_v1.ComponentStatus, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ComponentStatuses) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ComponentStatus, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ComponentStatus, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ComponentStatuses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ComponentStatuses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ComponentStatuses"), - go_opentelemetry_io_otel_attribute.String("kind", "ComponentStatus"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1ConfigMaps wrapper -type wrappedCoreV1ConfigMaps struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface -} - -func newCoreV1ConfigMaps(inner k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface) k8s_io_client_go_kubernetes_typed_core_v1.ConfigMapInterface { - return &wrappedCoreV1ConfigMaps{inner} -} -func (c *wrappedCoreV1ConfigMaps) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ConfigMapApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ConfigMaps) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ConfigMaps) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ConfigMaps) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ConfigMaps) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ConfigMaps) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ConfigMapList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ConfigMaps) 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) (*k8s_io_api_core_v1.ConfigMap, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ConfigMaps) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ConfigMap, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ConfigMap, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ConfigMaps) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ConfigMaps/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ConfigMaps"), - go_opentelemetry_io_otel_attribute.String("kind", "ConfigMap"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Endpoints wrapper -type wrappedCoreV1Endpoints struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface -} - -func newCoreV1Endpoints(inner k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface) k8s_io_client_go_kubernetes_typed_core_v1.EndpointsInterface { - return &wrappedCoreV1Endpoints{inner} -} -func (c *wrappedCoreV1Endpoints) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EndpointsApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Endpoints, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Endpoints) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Endpoints, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Endpoints) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Endpoints) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Endpoints) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Endpoints, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Endpoints) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EndpointsList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Endpoints) 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) (*k8s_io_api_core_v1.Endpoints, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Endpoints) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Endpoints, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Endpoints, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Endpoints) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Endpoints/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Endpoints"), - go_opentelemetry_io_otel_attribute.String("kind", "Endpoints"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Events wrapper -type wrappedCoreV1Events struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface -} - -func newCoreV1Events(inner k8s_io_client_go_kubernetes_typed_core_v1.EventInterface) k8s_io_client_go_kubernetes_typed_core_v1.EventInterface { - return &wrappedCoreV1Events{inner} -} -func (c *wrappedCoreV1Events) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Events) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Events) CreateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { - ret0, ret1 := c.inner.CreateWithEventNamespace(arg0) - return ret0, ret1 -} -func (c *wrappedCoreV1Events) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Events) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Events) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Events) GetFieldSelector(arg0 *string, arg1 *string, arg2 *string, arg3 *string) k8s_io_apimachinery_pkg_fields.Selector { - ret0 := c.inner.GetFieldSelector(arg0, arg1, arg2, arg3) - return ret0 -} -func (c *wrappedCoreV1Events) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.EventList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Events) 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) (*k8s_io_api_core_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Events) PatchWithEventNamespace(arg0 *k8s_io_api_core_v1.Event, arg1 []uint8) (*k8s_io_api_core_v1.Event, error) { - ret0, ret1 := c.inner.PatchWithEventNamespace(arg0, arg1) - return ret0, ret1 -} -func (c *wrappedCoreV1Events) Search(arg0 *k8s_io_apimachinery_pkg_runtime.Scheme, arg1 k8s_io_apimachinery_pkg_runtime.Object) (*k8s_io_api_core_v1.EventList, error) { - ret0, ret1 := c.inner.Search(arg0, arg1) - return ret0, ret1 -} -func (c *wrappedCoreV1Events) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Events) UpdateWithEventNamespace(arg0 *k8s_io_api_core_v1.Event) (*k8s_io_api_core_v1.Event, error) { - ret0, ret1 := c.inner.UpdateWithEventNamespace(arg0) - return ret0, ret1 -} -func (c *wrappedCoreV1Events) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Events/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1LimitRanges wrapper -type wrappedCoreV1LimitRanges struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface -} - -func newCoreV1LimitRanges(inner k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface) k8s_io_client_go_kubernetes_typed_core_v1.LimitRangeInterface { - return &wrappedCoreV1LimitRanges{inner} -} -func (c *wrappedCoreV1LimitRanges) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.LimitRangeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.LimitRange, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1LimitRanges) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.LimitRange, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1LimitRanges) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1LimitRanges) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1LimitRanges) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.LimitRange, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1LimitRanges) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.LimitRangeList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1LimitRanges) 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) (*k8s_io_api_core_v1.LimitRange, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1LimitRanges) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.LimitRange, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.LimitRange, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1LimitRanges) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/LimitRanges/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "LimitRanges"), - go_opentelemetry_io_otel_attribute.String("kind", "LimitRange"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Namespaces wrapper -type wrappedCoreV1Namespaces struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface -} - -func newCoreV1Namespaces(inner k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface) k8s_io_client_go_kubernetes_typed_core_v1.NamespaceInterface { - return &wrappedCoreV1Namespaces{inner} -} -func (c *wrappedCoreV1Namespaces) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NamespaceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Namespaces) Finalize(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Finalize", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Finalize(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NamespaceList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) 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) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Namespace, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Namespace, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Namespaces) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Namespaces/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Namespaces"), - go_opentelemetry_io_otel_attribute.String("kind", "Namespace"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Nodes wrapper -type wrappedCoreV1Nodes struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface -} - -func newCoreV1Nodes(inner k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface) k8s_io_client_go_kubernetes_typed_core_v1.NodeInterface { - return &wrappedCoreV1Nodes{inner} -} -func (c *wrappedCoreV1Nodes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.NodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Nodes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Nodes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.NodeList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) 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) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) PatchStatus(arg0 context.Context, arg1 string, arg2 []uint8) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/PatchStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.PatchStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Node, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Node, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Nodes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Nodes/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Nodes"), - go_opentelemetry_io_otel_attribute.String("kind", "Node"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1PersistentVolumeClaims wrapper -type wrappedCoreV1PersistentVolumeClaims struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface -} - -func newCoreV1PersistentVolumeClaims(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeClaimInterface { - return &wrappedCoreV1PersistentVolumeClaims{inner} -} -func (c *wrappedCoreV1PersistentVolumeClaims) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeClaimApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1PersistentVolumeClaims) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1PersistentVolumeClaims) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeClaimList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) 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) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolumeClaim, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolumeClaim, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumeClaims) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumeClaims/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumeClaims"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolumeClaim"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1PersistentVolumes wrapper -type wrappedCoreV1PersistentVolumes struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface -} - -func newCoreV1PersistentVolumes(inner k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface) k8s_io_client_go_kubernetes_typed_core_v1.PersistentVolumeInterface { - return &wrappedCoreV1PersistentVolumes{inner} -} -func (c *wrappedCoreV1PersistentVolumes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PersistentVolumeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1PersistentVolumes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1PersistentVolumes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PersistentVolumeList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) 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) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.PersistentVolume, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PersistentVolume, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PersistentVolumes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PersistentVolumes/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PersistentVolumes"), - go_opentelemetry_io_otel_attribute.String("kind", "PersistentVolume"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1PodTemplates wrapper -type wrappedCoreV1PodTemplates struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface -} - -func newCoreV1PodTemplates(inner k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface) k8s_io_client_go_kubernetes_typed_core_v1.PodTemplateInterface { - return &wrappedCoreV1PodTemplates{inner} -} -func (c *wrappedCoreV1PodTemplates) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodTemplateApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PodTemplates) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PodTemplates) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1PodTemplates) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1PodTemplates) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PodTemplates) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodTemplateList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PodTemplates) 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) (*k8s_io_api_core_v1.PodTemplate, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PodTemplates) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.PodTemplate, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.PodTemplate, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1PodTemplates) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/PodTemplates/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodTemplates"), - go_opentelemetry_io_otel_attribute.String("kind", "PodTemplate"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Pods wrapper -type wrappedCoreV1Pods struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface -} - -func newCoreV1Pods(inner k8s_io_client_go_kubernetes_typed_core_v1.PodInterface) k8s_io_client_go_kubernetes_typed_core_v1.PodInterface { - return &wrappedCoreV1Pods{inner} -} -func (c *wrappedCoreV1Pods) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.PodApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) Bind(arg0 context.Context, arg1 *k8s_io_api_core_v1.Binding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Bind", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Bind(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Pods) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Pods) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Pods) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Evict", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Evict(arg0, arg1) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Pods) EvictV1(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/EvictV1", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.EvictV1(arg0, arg1) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Pods) EvictV1beta1(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/EvictV1beta1", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.EvictV1beta1(arg0, arg1) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Pods) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) GetLogs(arg0 string, arg1 *k8s_io_api_core_v1.PodLogOptions) *k8s_io_client_go_rest.Request { - ret0 := c.inner.GetLogs(arg0, arg1) - return ret0 -} -func (c *wrappedCoreV1Pods) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.PodList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) 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) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { - ret0 := c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) - return ret0 -} -func (c *wrappedCoreV1Pods) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) UpdateEphemeralContainers(arg0 context.Context, arg1 string, arg2 *k8s_io_api_core_v1.Pod, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/UpdateEphemeralContainers", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateEphemeralContainers(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Pod, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Pod, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Pods) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Pods/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Pods"), - go_opentelemetry_io_otel_attribute.String("kind", "Pod"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1ReplicationControllers wrapper -type wrappedCoreV1ReplicationControllers struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface -} - -func newCoreV1ReplicationControllers(inner k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface) k8s_io_client_go_kubernetes_typed_core_v1.ReplicationControllerInterface { - return &wrappedCoreV1ReplicationControllers{inner} -} -func (c *wrappedCoreV1ReplicationControllers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ReplicationControllerApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ReplicationControllers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ReplicationControllers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ReplicationControllerList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) 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) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_autoscaling_v1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_autoscaling_v1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ReplicationController, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ReplicationController, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ReplicationControllers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ReplicationControllers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicationControllers"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicationController"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1ResourceQuotas wrapper -type wrappedCoreV1ResourceQuotas struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface -} - -func newCoreV1ResourceQuotas(inner k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface) k8s_io_client_go_kubernetes_typed_core_v1.ResourceQuotaInterface { - return &wrappedCoreV1ResourceQuotas{inner} -} -func (c *wrappedCoreV1ResourceQuotas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ResourceQuotaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ResourceQuotas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ResourceQuotas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ResourceQuotaList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) 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) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.ResourceQuota, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ResourceQuota, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ResourceQuotas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ResourceQuotas/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ResourceQuotas"), - go_opentelemetry_io_otel_attribute.String("kind", "ResourceQuota"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Secrets wrapper -type wrappedCoreV1Secrets struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface -} - -func newCoreV1Secrets(inner k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface) k8s_io_client_go_kubernetes_typed_core_v1.SecretInterface { - return &wrappedCoreV1Secrets{inner} -} -func (c *wrappedCoreV1Secrets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.SecretApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Secret, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Secrets) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Secret, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Secrets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Secrets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Secrets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Secret, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Secrets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.SecretList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Secrets) 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) (*k8s_io_api_core_v1.Secret, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Secrets) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Secret, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Secret, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Secrets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Secrets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Secrets"), - go_opentelemetry_io_otel_attribute.String("kind", "Secret"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1ServiceAccounts wrapper -type wrappedCoreV1ServiceAccounts struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface -} - -func newCoreV1ServiceAccounts(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface) k8s_io_client_go_kubernetes_typed_core_v1.ServiceAccountInterface { - return &wrappedCoreV1ServiceAccounts{inner} -} -func (c *wrappedCoreV1ServiceAccounts) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceAccountApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) CreateToken(arg0 context.Context, arg1 string, arg2 *k8s_io_api_authentication_v1.TokenRequest, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_authentication_v1.TokenRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/CreateToken", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.CreateToken(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ServiceAccounts) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1ServiceAccounts) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceAccountList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) 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) (*k8s_io_api_core_v1.ServiceAccount, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.ServiceAccount, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.ServiceAccount, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1ServiceAccounts) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/ServiceAccounts/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ServiceAccounts"), - go_opentelemetry_io_otel_attribute.String("kind", "ServiceAccount"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedCoreV1Services wrapper -type wrappedCoreV1Services struct { - inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface -} - -func newCoreV1Services(inner k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface) k8s_io_client_go_kubernetes_typed_core_v1.ServiceInterface { - return &wrappedCoreV1Services{inner} -} -func (c *wrappedCoreV1Services) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Apply", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_core_v1.ServiceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) Create(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Create", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Delete", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedCoreV1Services) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Get", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_core_v1.ServiceList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/List", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) 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) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Patch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) ProxyGet(arg0 string, arg1 string, arg2 string, arg3 string, arg4 map[string]string) k8s_io_client_go_rest.ResponseWrapper { - ret0 := c.inner.ProxyGet(arg0, arg1, arg2, arg3, arg4) - return ret0 -} -func (c *wrappedCoreV1Services) Update(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Update", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_core_v1.Service, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_core_v1.Service, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedCoreV1Services) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE CoreV1/Services/Watch", - go_opentelemetry_io_otel_attribute.String("client", "CoreV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Services"), - go_opentelemetry_io_otel_attribute.String("kind", "Service"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedDiscoveryV1EndpointSlices wrapper -type wrappedDiscoveryV1EndpointSlices struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface -} - -func newDiscoveryV1EndpointSlices(inner k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface) k8s_io_client_go_kubernetes_typed_discovery_v1.EndpointSliceInterface { - return &wrappedDiscoveryV1EndpointSlices{inner} -} -func (c *wrappedDiscoveryV1EndpointSlices) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Apply", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1EndpointSlices) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Create", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1EndpointSlices) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Delete", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedDiscoveryV1EndpointSlices) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedDiscoveryV1EndpointSlices) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Get", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1EndpointSlices) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1.EndpointSliceList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/List", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1EndpointSlices) 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) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Patch", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1EndpointSlices) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Update", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1EndpointSlices) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1/EndpointSlices/Watch", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedDiscoveryV1beta1EndpointSlices wrapper -type wrappedDiscoveryV1beta1EndpointSlices struct { - inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface -} - -func newDiscoveryV1beta1EndpointSlices(inner k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface) k8s_io_client_go_kubernetes_typed_discovery_v1beta1.EndpointSliceInterface { - return &wrappedDiscoveryV1beta1EndpointSlices{inner} -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_discovery_v1beta1.EndpointSliceApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Apply", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Create(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Create", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Delete", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Get", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_discovery_v1beta1.EndpointSliceList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/List", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) 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) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Patch", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Update(arg0 context.Context, arg1 *k8s_io_api_discovery_v1beta1.EndpointSlice, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_discovery_v1beta1.EndpointSlice, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Update", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedDiscoveryV1beta1EndpointSlices) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE DiscoveryV1beta1/EndpointSlices/Watch", - go_opentelemetry_io_otel_attribute.String("client", "DiscoveryV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "EndpointSlices"), - go_opentelemetry_io_otel_attribute.String("kind", "EndpointSlice"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedEventsV1Events wrapper -type wrappedEventsV1Events struct { - inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface -} - -func newEventsV1Events(inner k8s_io_client_go_kubernetes_typed_events_v1.EventInterface) k8s_io_client_go_kubernetes_typed_events_v1.EventInterface { - return &wrappedEventsV1Events{inner} -} -func (c *wrappedEventsV1Events) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Apply", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1Events) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Create", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1Events) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Delete", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedEventsV1Events) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedEventsV1Events) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_events_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Get", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1Events) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1.EventList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/List", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1Events) 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) (*k8s_io_api_events_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Patch", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1Events) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Update", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1Events) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1/Events/Watch", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedEventsV1beta1Events wrapper -type wrappedEventsV1beta1Events struct { - inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface -} - -func newEventsV1beta1Events(inner k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface) k8s_io_client_go_kubernetes_typed_events_v1beta1.EventInterface { - return &wrappedEventsV1beta1Events{inner} -} -func (c *wrappedEventsV1beta1Events) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_events_v1beta1.EventApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_events_v1beta1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Apply", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) Create(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_events_v1beta1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Create", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) CreateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { - ret0, ret1 := c.inner.CreateWithEventNamespace(arg0) - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Delete", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedEventsV1beta1Events) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedEventsV1beta1Events) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_events_v1beta1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Get", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_events_v1beta1.EventList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/List", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) 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) (*k8s_io_api_events_v1beta1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Patch", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) PatchWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event, arg1 []uint8) (*k8s_io_api_events_v1beta1.Event, error) { - ret0, ret1 := c.inner.PatchWithEventNamespace(arg0, arg1) - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) Update(arg0 context.Context, arg1 *k8s_io_api_events_v1beta1.Event, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_events_v1beta1.Event, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Update", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) UpdateWithEventNamespace(arg0 *k8s_io_api_events_v1beta1.Event) (*k8s_io_api_events_v1beta1.Event, error) { - ret0, ret1 := c.inner.UpdateWithEventNamespace(arg0) - return ret0, ret1 -} -func (c *wrappedEventsV1beta1Events) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE EventsV1beta1/Events/Watch", - go_opentelemetry_io_otel_attribute.String("client", "EventsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Events"), - go_opentelemetry_io_otel_attribute.String("kind", "Event"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedExtensionsV1beta1DaemonSets wrapper -type wrappedExtensionsV1beta1DaemonSets struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface -} - -func newExtensionsV1beta1DaemonSets(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DaemonSetInterface { - return &wrappedExtensionsV1beta1DaemonSets{inner} -} -func (c *wrappedExtensionsV1beta1DaemonSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DaemonSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1DaemonSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1DaemonSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DaemonSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/List", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) 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) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DaemonSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.DaemonSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1DaemonSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/DaemonSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "DaemonSets"), - go_opentelemetry_io_otel_attribute.String("kind", "DaemonSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedExtensionsV1beta1Deployments wrapper -type wrappedExtensionsV1beta1Deployments struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface -} - -func newExtensionsV1beta1Deployments(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.DeploymentInterface { - return &wrappedExtensionsV1beta1Deployments{inner} -} -func (c *wrappedExtensionsV1beta1Deployments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/ApplyScale", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.DeploymentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Create", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1Deployments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1Deployments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Get", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.DeploymentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/List", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) 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) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) Rollback(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.DeploymentRollback, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Rollback", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Rollback(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1Deployments) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Update", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Deployment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Deployment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Deployments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Deployments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Deployments"), - go_opentelemetry_io_otel_attribute.String("kind", "Deployment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedExtensionsV1beta1Ingresses wrapper -type wrappedExtensionsV1beta1Ingresses struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface -} - -func newExtensionsV1beta1Ingresses(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.IngressInterface { - return &wrappedExtensionsV1beta1Ingresses{inner} -} -func (c *wrappedExtensionsV1beta1Ingresses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Create", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1Ingresses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1Ingresses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Get", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.IngressList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/List", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) 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) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Update", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1Ingresses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/Ingresses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedExtensionsV1beta1NetworkPolicies wrapper -type wrappedExtensionsV1beta1NetworkPolicies struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface -} - -func newExtensionsV1beta1NetworkPolicies(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.NetworkPolicyInterface { - return &wrappedExtensionsV1beta1NetworkPolicies{inner} -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Apply", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) 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) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1NetworkPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/NetworkPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedExtensionsV1beta1PodSecurityPolicies wrapper -type wrappedExtensionsV1beta1PodSecurityPolicies struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface -} - -func newExtensionsV1beta1PodSecurityPolicies(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.PodSecurityPolicyInterface { - return &wrappedExtensionsV1beta1PodSecurityPolicies{inner} -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Apply", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) 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) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1PodSecurityPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/PodSecurityPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedExtensionsV1beta1ReplicaSets wrapper -type wrappedExtensionsV1beta1ReplicaSets struct { - inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface -} - -func newExtensionsV1beta1ReplicaSets(inner k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface) k8s_io_client_go_kubernetes_typed_extensions_v1beta1.ReplicaSetInterface { - return &wrappedExtensionsV1beta1ReplicaSets{inner} -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) ApplyScale(arg0 context.Context, arg1 string, arg2 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ScaleApplyConfiguration, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/ApplyScale", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_extensions_v1beta1.ReplicaSetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Create(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Create", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Get", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) GetScale(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/GetScale", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.GetScale(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/List", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) 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) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Update(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Update", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) UpdateScale(arg0 context.Context, arg1 string, arg2 *k8s_io_api_extensions_v1beta1.Scale, arg3 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.Scale, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/UpdateScale", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateScale(arg0, arg1, arg2, arg3) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_extensions_v1beta1.ReplicaSet, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_extensions_v1beta1.ReplicaSet, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedExtensionsV1beta1ReplicaSets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE ExtensionsV1beta1/ReplicaSets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "ExtensionsV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ReplicaSets"), - go_opentelemetry_io_otel_attribute.String("kind", "ReplicaSet"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedFlowcontrolV1alpha1FlowSchemas wrapper -type wrappedFlowcontrolV1alpha1FlowSchemas struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface -} - -func newFlowcontrolV1alpha1FlowSchemas(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.FlowSchemaInterface { - return &wrappedFlowcontrolV1alpha1FlowSchemas{inner} -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Apply", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Create", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Delete", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Get", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchemaList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/List", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) 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) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Patch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Update", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1FlowSchemas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/FlowSchemas/Watch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedFlowcontrolV1alpha1PriorityLevelConfigurations wrapper -type wrappedFlowcontrolV1alpha1PriorityLevelConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface -} - -func newFlowcontrolV1alpha1PriorityLevelConfigurations(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1alpha1.PriorityLevelConfigurationInterface { - return &wrappedFlowcontrolV1alpha1PriorityLevelConfigurations{inner} -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1alpha1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) 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) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1alpha1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1alpha1PriorityLevelConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1alpha1/PriorityLevelConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedFlowcontrolV1beta1FlowSchemas wrapper -type wrappedFlowcontrolV1beta1FlowSchemas struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface -} - -func newFlowcontrolV1beta1FlowSchemas(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.FlowSchemaInterface { - return &wrappedFlowcontrolV1beta1FlowSchemas{inner} -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Apply", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Create", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Delete", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Get", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchemaList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/List", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) 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) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Patch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Update", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1FlowSchemas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/FlowSchemas/Watch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedFlowcontrolV1beta1PriorityLevelConfigurations wrapper -type wrappedFlowcontrolV1beta1PriorityLevelConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface -} - -func newFlowcontrolV1beta1PriorityLevelConfigurations(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta1.PriorityLevelConfigurationInterface { - return &wrappedFlowcontrolV1beta1PriorityLevelConfigurations{inner} -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta1.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) 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) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta1.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta1PriorityLevelConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta1/PriorityLevelConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedFlowcontrolV1beta2FlowSchemas wrapper -type wrappedFlowcontrolV1beta2FlowSchemas struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface -} - -func newFlowcontrolV1beta2FlowSchemas(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.FlowSchemaInterface { - return &wrappedFlowcontrolV1beta2FlowSchemas{inner} -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Apply", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.FlowSchemaApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Create", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Delete", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Get", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchemaList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/List", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) 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) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Patch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Update", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.FlowSchema, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.FlowSchema, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2FlowSchemas) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/FlowSchemas/Watch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "FlowSchemas"), - go_opentelemetry_io_otel_attribute.String("kind", "FlowSchema"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedFlowcontrolV1beta2PriorityLevelConfigurations wrapper -type wrappedFlowcontrolV1beta2PriorityLevelConfigurations struct { - inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface -} - -func newFlowcontrolV1beta2PriorityLevelConfigurations(inner k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface) k8s_io_client_go_kubernetes_typed_flowcontrol_v1beta2.PriorityLevelConfigurationInterface { - return &wrappedFlowcontrolV1beta2PriorityLevelConfigurations{inner} -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Apply", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_flowcontrol_v1beta2.PriorityLevelConfigurationApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Create(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Create", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Delete", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Get", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfigurationList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/List", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) 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) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Patch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Update(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Update", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_flowcontrol_v1beta2.PriorityLevelConfiguration, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedFlowcontrolV1beta2PriorityLevelConfigurations) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE FlowcontrolV1beta2/PriorityLevelConfigurations/Watch", - go_opentelemetry_io_otel_attribute.String("client", "FlowcontrolV1beta2"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityLevelConfigurations"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityLevelConfiguration"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedInternalV1alpha1StorageVersions wrapper -type wrappedInternalV1alpha1StorageVersions struct { - inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface -} - -func newInternalV1alpha1StorageVersions(inner k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface) k8s_io_client_go_kubernetes_typed_apiserverinternal_v1alpha1.StorageVersionInterface { - return &wrappedInternalV1alpha1StorageVersions{inner} -} -func (c *wrappedInternalV1alpha1StorageVersions) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Apply", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_apiserverinternal_v1alpha1.StorageVersionApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) Create(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Create", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Delete", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedInternalV1alpha1StorageVersions) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedInternalV1alpha1StorageVersions) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Get", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersionList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/List", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) 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) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Patch", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) Update(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Update", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_apiserverinternal_v1alpha1.StorageVersion, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedInternalV1alpha1StorageVersions) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE InternalV1alpha1/StorageVersions/Watch", - go_opentelemetry_io_otel_attribute.String("client", "InternalV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageVersions"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageVersion"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNetworkingV1IngressClasses wrapper -type wrappedNetworkingV1IngressClasses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface -} - -func newNetworkingV1IngressClasses(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface) k8s_io_client_go_kubernetes_typed_networking_v1.IngressClassInterface { - return &wrappedNetworkingV1IngressClasses{inner} -} -func (c *wrappedNetworkingV1IngressClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1IngressClasses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1IngressClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1IngressClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1IngressClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1IngressClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1IngressClasses) 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) (*k8s_io_api_networking_v1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1IngressClasses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1IngressClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/IngressClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNetworkingV1Ingresses wrapper -type wrappedNetworkingV1Ingresses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface -} - -func newNetworkingV1Ingresses(inner k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface) k8s_io_client_go_kubernetes_typed_networking_v1.IngressInterface { - return &wrappedNetworkingV1Ingresses{inner} -} -func (c *wrappedNetworkingV1Ingresses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1Ingresses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1Ingresses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.IngressList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/List", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) 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) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1Ingresses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/Ingresses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNetworkingV1NetworkPolicies wrapper -type wrappedNetworkingV1NetworkPolicies struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface -} - -func newNetworkingV1NetworkPolicies(inner k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface) k8s_io_client_go_kubernetes_typed_networking_v1.NetworkPolicyInterface { - return &wrappedNetworkingV1NetworkPolicies{inner} -} -func (c *wrappedNetworkingV1NetworkPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1.NetworkPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1NetworkPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1NetworkPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1.NetworkPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) 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) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1.NetworkPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1.NetworkPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1NetworkPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1/NetworkPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "NetworkPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "NetworkPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNetworkingV1alpha1ClusterCIDRs wrapper -type wrappedNetworkingV1alpha1ClusterCIDRs struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface -} - -func newNetworkingV1alpha1ClusterCIDRs(inner k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface) k8s_io_client_go_kubernetes_typed_networking_v1alpha1.ClusterCIDRInterface { - return &wrappedNetworkingV1alpha1ClusterCIDRs{inner} -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1alpha1.ClusterCIDRApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Create", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Get", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDRList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/List", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) 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) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1alpha1.ClusterCIDR, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1alpha1.ClusterCIDR, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Update", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1alpha1ClusterCIDRs) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1alpha1/ClusterCIDRs/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCIDRs"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCIDR"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNetworkingV1beta1IngressClasses wrapper -type wrappedNetworkingV1beta1IngressClasses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface -} - -func newNetworkingV1beta1IngressClasses(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressClassInterface { - return &wrappedNetworkingV1beta1IngressClasses{inner} -} -func (c *wrappedNetworkingV1beta1IngressClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1IngressClasses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1IngressClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1beta1IngressClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1beta1IngressClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1IngressClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1IngressClasses) 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) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1IngressClasses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.IngressClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.IngressClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1IngressClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/IngressClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "IngressClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "IngressClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNetworkingV1beta1Ingresses wrapper -type wrappedNetworkingV1beta1Ingresses struct { - inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface -} - -func newNetworkingV1beta1Ingresses(inner k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface) k8s_io_client_go_kubernetes_typed_networking_v1beta1.IngressInterface { - return &wrappedNetworkingV1beta1Ingresses{inner} -} -func (c *wrappedNetworkingV1beta1Ingresses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_networking_v1beta1.IngressApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) Create(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1beta1Ingresses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNetworkingV1beta1Ingresses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_networking_v1beta1.IngressList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/List", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) 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) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) Update(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_networking_v1beta1.Ingress, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_networking_v1beta1.Ingress, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNetworkingV1beta1Ingresses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NetworkingV1beta1/Ingresses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NetworkingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Ingresses"), - go_opentelemetry_io_otel_attribute.String("kind", "Ingress"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNodeV1RuntimeClasses wrapper -type wrappedNodeV1RuntimeClasses struct { - inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface -} - -func newNodeV1RuntimeClasses(inner k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface) k8s_io_client_go_kubernetes_typed_node_v1.RuntimeClassInterface { - return &wrappedNodeV1RuntimeClasses{inner} -} -func (c *wrappedNodeV1RuntimeClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1RuntimeClasses) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1RuntimeClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNodeV1RuntimeClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNodeV1RuntimeClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1RuntimeClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1.RuntimeClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1RuntimeClasses) 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) (*k8s_io_api_node_v1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1RuntimeClasses) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1RuntimeClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1/RuntimeClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNodeV1alpha1RuntimeClasses wrapper -type wrappedNodeV1alpha1RuntimeClasses struct { - inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface -} - -func newNodeV1alpha1RuntimeClasses(inner k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface) k8s_io_client_go_kubernetes_typed_node_v1alpha1.RuntimeClassInterface { - return &wrappedNodeV1alpha1RuntimeClasses{inner} -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1alpha1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1alpha1.RuntimeClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) 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) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1alpha1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1alpha1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1alpha1RuntimeClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1alpha1/RuntimeClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedNodeV1beta1RuntimeClasses wrapper -type wrappedNodeV1beta1RuntimeClasses struct { - inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface -} - -func newNodeV1beta1RuntimeClasses(inner k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface) k8s_io_client_go_kubernetes_typed_node_v1beta1.RuntimeClassInterface { - return &wrappedNodeV1beta1RuntimeClasses{inner} -} -func (c *wrappedNodeV1beta1RuntimeClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_node_v1beta1.RuntimeClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1beta1RuntimeClasses) Create(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1beta1RuntimeClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNodeV1beta1RuntimeClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedNodeV1beta1RuntimeClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1beta1RuntimeClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_node_v1beta1.RuntimeClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1beta1RuntimeClasses) 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) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1beta1RuntimeClasses) Update(arg0 context.Context, arg1 *k8s_io_api_node_v1beta1.RuntimeClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_node_v1beta1.RuntimeClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedNodeV1beta1RuntimeClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE NodeV1beta1/RuntimeClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "NodeV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RuntimeClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "RuntimeClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedPolicyV1Evictions wrapper -type wrappedPolicyV1Evictions struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface -} - -func newPolicyV1Evictions(inner k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface) k8s_io_client_go_kubernetes_typed_policy_v1.EvictionInterface { - return &wrappedPolicyV1Evictions{inner} -} -func (c *wrappedPolicyV1Evictions) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1.Eviction) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/Evictions/Evict", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Evictions"), - go_opentelemetry_io_otel_attribute.String("kind", "Eviction"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Evict(arg0, arg1) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} - -// wrappedPolicyV1PodDisruptionBudgets wrapper -type wrappedPolicyV1PodDisruptionBudgets struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface -} - -func newPolicyV1PodDisruptionBudgets(inner k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface) k8s_io_client_go_kubernetes_typed_policy_v1.PodDisruptionBudgetInterface { - return &wrappedPolicyV1PodDisruptionBudgets{inner} -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Create", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Get", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1.PodDisruptionBudgetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/List", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) 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) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Update", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1PodDisruptionBudgets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1/PodDisruptionBudgets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedPolicyV1beta1Evictions wrapper -type wrappedPolicyV1beta1Evictions struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface -} - -func newPolicyV1beta1Evictions(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface) k8s_io_client_go_kubernetes_typed_policy_v1beta1.EvictionInterface { - return &wrappedPolicyV1beta1Evictions{inner} -} -func (c *wrappedPolicyV1beta1Evictions) Evict(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.Eviction) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/Evictions/Evict", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Evictions"), - go_opentelemetry_io_otel_attribute.String("kind", "Eviction"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Evict(arg0, arg1) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} - -// wrappedPolicyV1beta1PodDisruptionBudgets wrapper -type wrappedPolicyV1beta1PodDisruptionBudgets struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface -} - -func newPolicyV1beta1PodDisruptionBudgets(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodDisruptionBudgetInterface { - return &wrappedPolicyV1beta1PodDisruptionBudgets{inner} -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Apply", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodDisruptionBudgetApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Create", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Delete", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Get", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudgetList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/List", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) 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) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Patch", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Update", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodDisruptionBudget, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodDisruptionBudget, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodDisruptionBudgets) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodDisruptionBudgets/Watch", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodDisruptionBudgets"), - go_opentelemetry_io_otel_attribute.String("kind", "PodDisruptionBudget"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedPolicyV1beta1PodSecurityPolicies wrapper -type wrappedPolicyV1beta1PodSecurityPolicies struct { - inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface -} - -func newPolicyV1beta1PodSecurityPolicies(inner k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface) k8s_io_client_go_kubernetes_typed_policy_v1beta1.PodSecurityPolicyInterface { - return &wrappedPolicyV1beta1PodSecurityPolicies{inner} -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_policy_v1beta1.PodSecurityPolicyApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Apply", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Create(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) 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) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Update(arg0 context.Context, arg1 *k8s_io_api_policy_v1beta1.PodSecurityPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_policy_v1beta1.PodSecurityPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedPolicyV1beta1PodSecurityPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE PolicyV1beta1/PodSecurityPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "PolicyV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PodSecurityPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "PodSecurityPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1ClusterRoleBindings wrapper -type wrappedRbacV1ClusterRoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface -} - -func newRbacV1ClusterRoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleBindingInterface { - return &wrappedRbacV1ClusterRoleBindings{inner} -} -func (c *wrappedRbacV1ClusterRoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1ClusterRoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1ClusterRoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleBindingList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoleBindings) 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) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoleBindings/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1ClusterRoles wrapper -type wrappedRbacV1ClusterRoles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface -} - -func newRbacV1ClusterRoles(inner k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface) k8s_io_client_go_kubernetes_typed_rbac_v1.ClusterRoleInterface { - return &wrappedRbacV1ClusterRoles{inner} -} -func (c *wrappedRbacV1ClusterRoles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1ClusterRoles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1ClusterRoles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.ClusterRoleList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoles) 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) (*k8s_io_api_rbac_v1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1ClusterRoles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/ClusterRoles/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1RoleBindings wrapper -type wrappedRbacV1RoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface -} - -func newRbacV1RoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleBindingInterface { - return &wrappedRbacV1RoleBindings{inner} -} -func (c *wrappedRbacV1RoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1RoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1RoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1RoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1RoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1RoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleBindingList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1RoleBindings) 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) (*k8s_io_api_rbac_v1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1RoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1RoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/RoleBindings/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1Roles wrapper -type wrappedRbacV1Roles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface -} - -func newRbacV1Roles(inner k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface) k8s_io_client_go_kubernetes_typed_rbac_v1.RoleInterface { - return &wrappedRbacV1Roles{inner} -} -func (c *wrappedRbacV1Roles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1Roles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1Roles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1Roles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1Roles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1Roles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1.RoleList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1Roles) 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) (*k8s_io_api_rbac_v1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1Roles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1Roles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1/Roles/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1alpha1ClusterRoleBindings wrapper -type wrappedRbacV1alpha1ClusterRoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface -} - -func newRbacV1alpha1ClusterRoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleBindingInterface { - return &wrappedRbacV1alpha1ClusterRoleBindings{inner} -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBindingList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) 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) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoleBindings/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1alpha1ClusterRoles wrapper -type wrappedRbacV1alpha1ClusterRoles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface -} - -func newRbacV1alpha1ClusterRoles(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.ClusterRoleInterface { - return &wrappedRbacV1alpha1ClusterRoles{inner} -} -func (c *wrappedRbacV1alpha1ClusterRoles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1ClusterRoles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1ClusterRoles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRoleList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoles) 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) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1ClusterRoles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/ClusterRoles/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1alpha1RoleBindings wrapper -type wrappedRbacV1alpha1RoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface -} - -func newRbacV1alpha1RoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleBindingInterface { - return &wrappedRbacV1alpha1RoleBindings{inner} -} -func (c *wrappedRbacV1alpha1RoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1RoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1RoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1RoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1RoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1RoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleBindingList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1RoleBindings) 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) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1RoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1RoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/RoleBindings/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1alpha1Roles wrapper -type wrappedRbacV1alpha1Roles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface -} - -func newRbacV1alpha1Roles(inner k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface) k8s_io_client_go_kubernetes_typed_rbac_v1alpha1.RoleInterface { - return &wrappedRbacV1alpha1Roles{inner} -} -func (c *wrappedRbacV1alpha1Roles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1alpha1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1Roles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1Roles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1Roles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1alpha1Roles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1Roles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1alpha1.RoleList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1Roles) 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) (*k8s_io_api_rbac_v1alpha1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1Roles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1alpha1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1alpha1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1alpha1Roles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1alpha1/Roles/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1beta1ClusterRoleBindings wrapper -type wrappedRbacV1beta1ClusterRoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface -} - -func newRbacV1beta1ClusterRoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleBindingInterface { - return &wrappedRbacV1beta1ClusterRoleBindings{inner} -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBindingList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) 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) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoleBindings/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1beta1ClusterRoles wrapper -type wrappedRbacV1beta1ClusterRoles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface -} - -func newRbacV1beta1ClusterRoles(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.ClusterRoleInterface { - return &wrappedRbacV1beta1ClusterRoles{inner} -} -func (c *wrappedRbacV1beta1ClusterRoles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.ClusterRoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1ClusterRoles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1ClusterRoles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.ClusterRoleList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoles) 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) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.ClusterRole, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.ClusterRole, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1ClusterRoles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/ClusterRoles/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterRoles"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterRole"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1beta1RoleBindings wrapper -type wrappedRbacV1beta1RoleBindings struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface -} - -func newRbacV1beta1RoleBindings(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleBindingInterface { - return &wrappedRbacV1beta1RoleBindings{inner} -} -func (c *wrappedRbacV1beta1RoleBindings) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleBindingApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1RoleBindings) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1RoleBindings) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1RoleBindings) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1RoleBindings) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1RoleBindings) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleBindingList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1RoleBindings) 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) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1RoleBindings) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.RoleBinding, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.RoleBinding, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1RoleBindings) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/RoleBindings/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "RoleBindings"), - go_opentelemetry_io_otel_attribute.String("kind", "RoleBinding"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedRbacV1beta1Roles wrapper -type wrappedRbacV1beta1Roles struct { - inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface -} - -func newRbacV1beta1Roles(inner k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface) k8s_io_client_go_kubernetes_typed_rbac_v1beta1.RoleInterface { - return &wrappedRbacV1beta1Roles{inner} -} -func (c *wrappedRbacV1beta1Roles) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_rbac_v1beta1.RoleApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Apply", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1Roles) Create(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Create", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1Roles) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Delete", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1Roles) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedRbacV1beta1Roles) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Get", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1Roles) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_rbac_v1beta1.RoleList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/List", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1Roles) 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) (*k8s_io_api_rbac_v1beta1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Patch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1Roles) Update(arg0 context.Context, arg1 *k8s_io_api_rbac_v1beta1.Role, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_rbac_v1beta1.Role, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Update", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedRbacV1beta1Roles) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE RbacV1beta1/Roles/Watch", - go_opentelemetry_io_otel_attribute.String("client", "RbacV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "Roles"), - go_opentelemetry_io_otel_attribute.String("kind", "Role"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedSchedulingV1PriorityClasses wrapper -type wrappedSchedulingV1PriorityClasses struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface -} - -func newSchedulingV1PriorityClasses(inner k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface) k8s_io_client_go_kubernetes_typed_scheduling_v1.PriorityClassInterface { - return &wrappedSchedulingV1PriorityClasses{inner} -} -func (c *wrappedSchedulingV1PriorityClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1PriorityClasses) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1PriorityClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedSchedulingV1PriorityClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedSchedulingV1PriorityClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1PriorityClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1.PriorityClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1PriorityClasses) 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) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1PriorityClasses) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1PriorityClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1/PriorityClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedSchedulingV1alpha1PriorityClasses wrapper -type wrappedSchedulingV1alpha1PriorityClasses struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface -} - -func newSchedulingV1alpha1PriorityClasses(inner k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface) k8s_io_client_go_kubernetes_typed_scheduling_v1alpha1.PriorityClassInterface { - return &wrappedSchedulingV1alpha1PriorityClasses{inner} -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1alpha1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) 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) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1alpha1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1alpha1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1alpha1PriorityClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1alpha1/PriorityClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedSchedulingV1beta1PriorityClasses wrapper -type wrappedSchedulingV1beta1PriorityClasses struct { - inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface -} - -func newSchedulingV1beta1PriorityClasses(inner k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface) k8s_io_client_go_kubernetes_typed_scheduling_v1beta1.PriorityClassInterface { - return &wrappedSchedulingV1beta1PriorityClasses{inner} -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_scheduling_v1beta1.PriorityClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Create(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) 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) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Update(arg0 context.Context, arg1 *k8s_io_api_scheduling_v1beta1.PriorityClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_scheduling_v1beta1.PriorityClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedSchedulingV1beta1PriorityClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE SchedulingV1beta1/PriorityClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "SchedulingV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "PriorityClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "PriorityClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1CSIDrivers wrapper -type wrappedStorageV1CSIDrivers struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface -} - -func newStorageV1CSIDrivers(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface) k8s_io_client_go_kubernetes_typed_storage_v1.CSIDriverInterface { - return &wrappedStorageV1CSIDrivers{inner} -} -func (c *wrappedStorageV1CSIDrivers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIDrivers) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIDrivers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1CSIDrivers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1CSIDrivers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIDrivers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIDriverList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIDrivers) 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) (*k8s_io_api_storage_v1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIDrivers) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIDrivers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIDrivers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1CSINodes wrapper -type wrappedStorageV1CSINodes struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface -} - -func newStorageV1CSINodes(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface) k8s_io_client_go_kubernetes_typed_storage_v1.CSINodeInterface { - return &wrappedStorageV1CSINodes{inner} -} -func (c *wrappedStorageV1CSINodes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSINodes) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSINodes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1CSINodes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1CSINodes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSINodes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSINodeList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSINodes) 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) (*k8s_io_api_storage_v1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSINodes) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSINodes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSINodes/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1CSIStorageCapacities wrapper -type wrappedStorageV1CSIStorageCapacities struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface -} - -func newStorageV1CSIStorageCapacities(inner k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface) k8s_io_client_go_kubernetes_typed_storage_v1.CSIStorageCapacityInterface { - return &wrappedStorageV1CSIStorageCapacities{inner} -} -func (c *wrappedStorageV1CSIStorageCapacities) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIStorageCapacities) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIStorageCapacities) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1CSIStorageCapacities) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1CSIStorageCapacities) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIStorageCapacities) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.CSIStorageCapacityList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIStorageCapacities) 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) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIStorageCapacities) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1CSIStorageCapacities) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/CSIStorageCapacities/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1StorageClasses wrapper -type wrappedStorageV1StorageClasses struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface -} - -func newStorageV1StorageClasses(inner k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface) k8s_io_client_go_kubernetes_typed_storage_v1.StorageClassInterface { - return &wrappedStorageV1StorageClasses{inner} -} -func (c *wrappedStorageV1StorageClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1StorageClasses) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1StorageClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1StorageClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1StorageClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1StorageClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.StorageClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1StorageClasses) 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) (*k8s_io_api_storage_v1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1StorageClasses) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1StorageClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/StorageClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1VolumeAttachments wrapper -type wrappedStorageV1VolumeAttachments struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface -} - -func newStorageV1VolumeAttachments(inner k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface) k8s_io_client_go_kubernetes_typed_storage_v1.VolumeAttachmentInterface { - return &wrappedStorageV1VolumeAttachments{inner} -} -func (c *wrappedStorageV1VolumeAttachments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1VolumeAttachments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1VolumeAttachments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1.VolumeAttachmentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) 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) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1VolumeAttachments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1/VolumeAttachments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1alpha1CSIStorageCapacities wrapper -type wrappedStorageV1alpha1CSIStorageCapacities struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface -} - -func newStorageV1alpha1CSIStorageCapacities(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.CSIStorageCapacityInterface { - return &wrappedStorageV1alpha1CSIStorageCapacities{inner} -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacityList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) 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) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1CSIStorageCapacities) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/CSIStorageCapacities/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1alpha1VolumeAttachments wrapper -type wrappedStorageV1alpha1VolumeAttachments struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface -} - -func newStorageV1alpha1VolumeAttachments(inner k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface) k8s_io_client_go_kubernetes_typed_storage_v1alpha1.VolumeAttachmentInterface { - return &wrappedStorageV1alpha1VolumeAttachments{inner} -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1alpha1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachmentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) 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) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1alpha1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1alpha1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1alpha1VolumeAttachments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1alpha1/VolumeAttachments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1beta1CSIDrivers wrapper -type wrappedStorageV1beta1CSIDrivers struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface -} - -func newStorageV1beta1CSIDrivers(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIDriverInterface { - return &wrappedStorageV1beta1CSIDrivers{inner} -} -func (c *wrappedStorageV1beta1CSIDrivers) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIDriverApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIDrivers) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIDrivers) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1CSIDrivers) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1CSIDrivers) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIDrivers) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIDriverList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIDrivers) 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) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIDrivers) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIDriver, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIDriver, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIDrivers) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIDrivers/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIDrivers"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIDriver"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1beta1CSINodes wrapper -type wrappedStorageV1beta1CSINodes struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface -} - -func newStorageV1beta1CSINodes(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSINodeInterface { - return &wrappedStorageV1beta1CSINodes{inner} -} -func (c *wrappedStorageV1beta1CSINodes) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSINodeApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSINodes) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSINodes) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1CSINodes) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1CSINodes) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSINodes) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSINodeList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSINodes) 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) (*k8s_io_api_storage_v1beta1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSINodes) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSINode, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSINode, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSINodes) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSINodes/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSINodes"), - go_opentelemetry_io_otel_attribute.String("kind", "CSINode"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1beta1CSIStorageCapacities wrapper -type wrappedStorageV1beta1CSIStorageCapacities struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface -} - -func newStorageV1beta1CSIStorageCapacities(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface) k8s_io_client_go_kubernetes_typed_storage_v1beta1.CSIStorageCapacityInterface { - return &wrappedStorageV1beta1CSIStorageCapacities{inner} -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.CSIStorageCapacityApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacityList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) 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) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.CSIStorageCapacity, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.CSIStorageCapacity, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1CSIStorageCapacities) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/CSIStorageCapacities/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "CSIStorageCapacities"), - go_opentelemetry_io_otel_attribute.String("kind", "CSIStorageCapacity"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1beta1StorageClasses wrapper -type wrappedStorageV1beta1StorageClasses struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface -} - -func newStorageV1beta1StorageClasses(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface) k8s_io_client_go_kubernetes_typed_storage_v1beta1.StorageClassInterface { - return &wrappedStorageV1beta1StorageClasses{inner} -} -func (c *wrappedStorageV1beta1StorageClasses) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.StorageClassApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1StorageClasses) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1StorageClasses) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1StorageClasses) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1StorageClasses) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1StorageClasses) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.StorageClassList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1StorageClasses) 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) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1StorageClasses) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.StorageClass, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.StorageClass, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1StorageClasses) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/StorageClasses/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "StorageClasses"), - go_opentelemetry_io_otel_attribute.String("kind", "StorageClass"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedStorageV1beta1VolumeAttachments wrapper -type wrappedStorageV1beta1VolumeAttachments struct { - inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface -} - -func newStorageV1beta1VolumeAttachments(inner k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface) k8s_io_client_go_kubernetes_typed_storage_v1beta1.VolumeAttachmentInterface { - return &wrappedStorageV1beta1VolumeAttachments{inner} -} -func (c *wrappedStorageV1beta1VolumeAttachments) Apply(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Apply", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Apply(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) ApplyStatus(arg0 context.Context, arg1 *k8s_io_client_go_applyconfigurations_storage_v1beta1.VolumeAttachmentApplyConfiguration, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ApplyOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/ApplyStatus", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.ApplyStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) Create(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Create", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Delete", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1VolumeAttachments) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedStorageV1beta1VolumeAttachments) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Get", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachmentList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/List", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) 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) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Patch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) Update(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Update", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) UpdateStatus(arg0 context.Context, arg1 *k8s_io_api_storage_v1beta1.VolumeAttachment, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_api_storage_v1beta1.VolumeAttachment, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedStorageV1beta1VolumeAttachments) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kube", - "KUBE StorageV1beta1/VolumeAttachments/Watch", - go_opentelemetry_io_otel_attribute.String("client", "StorageV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "VolumeAttachments"), - go_opentelemetry_io_otel_attribute.String("kind", "VolumeAttachment"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} diff --git a/pkg/clients/middleware/tracing/kyverno/clientset.generated.go b/pkg/clients/middleware/tracing/kyverno/clientset.generated.go deleted file mode 100644 index 7d9f2a9464..0000000000 --- a/pkg/clients/middleware/tracing/kyverno/clientset.generated.go +++ /dev/null @@ -1,2117 +0,0 @@ -package client - -import ( - context "context" - - github_com_kyverno_kyverno_api_kyverno_v1 "github.com/kyverno/kyverno/api/kyverno/v1" - github_com_kyverno_kyverno_api_kyverno_v1alpha1 "github.com/kyverno/kyverno/api/kyverno/v1alpha1" - github_com_kyverno_kyverno_api_kyverno_v1alpha2 "github.com/kyverno/kyverno/api/kyverno/v1alpha2" - github_com_kyverno_kyverno_api_kyverno_v1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" - github_com_kyverno_kyverno_api_policyreport_v1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2" - github_com_kyverno_kyverno_pkg_client_clientset_versioned "github.com/kyverno/kyverno/pkg/client/clientset/versioned" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha1" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1alpha2" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/kyverno/v1beta1" - github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2 "github.com/kyverno/kyverno/pkg/client/clientset/versioned/typed/policyreport/v1alpha2" - github_com_kyverno_kyverno_pkg_tracing "github.com/kyverno/kyverno/pkg/tracing" - go_opentelemetry_io_otel_attribute "go.opentelemetry.io/otel/attribute" - go_opentelemetry_io_otel_codes "go.opentelemetry.io/otel/codes" - k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" - k8s_io_apimachinery_pkg_watch "k8s.io/apimachinery/pkg/watch" - k8s_io_client_go_discovery "k8s.io/client-go/discovery" - k8s_io_client_go_rest "k8s.io/client-go/rest" -) - -// Wrap -func Wrap(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface { - return &clientset{ - inner: inner, - kyvernov1: newKyvernoV1(inner.KyvernoV1()), - kyvernov1alpha1: newKyvernoV1alpha1(inner.KyvernoV1alpha1()), - kyvernov1alpha2: newKyvernoV1alpha2(inner.KyvernoV1alpha2()), - kyvernov1beta1: newKyvernoV1beta1(inner.KyvernoV1beta1()), - wgpolicyk8sv1alpha2: newWgpolicyk8sV1alpha2(inner.Wgpolicyk8sV1alpha2()), - } -} - -// clientset wrapper -type clientset struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned.Interface - kyvernov1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface - kyvernov1alpha1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface - kyvernov1alpha2 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface - kyvernov1beta1 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface - wgpolicyk8sv1alpha2 github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface -} - -// Discovery is NOT instrumented -func (c *clientset) Discovery() k8s_io_client_go_discovery.DiscoveryInterface { - return c.inner.Discovery() -} -func (c *clientset) KyvernoV1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { - return c.kyvernov1 -} -func (c *clientset) KyvernoV1alpha1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { - return c.kyvernov1alpha1 -} -func (c *clientset) KyvernoV1alpha2() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { - return c.kyvernov1alpha2 -} -func (c *clientset) KyvernoV1beta1() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { - return c.kyvernov1beta1 -} -func (c *clientset) Wgpolicyk8sV1alpha2() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { - return c.wgpolicyk8sv1alpha2 -} - -// wrappedKyvernoV1 wrapper -type wrappedKyvernoV1 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface -} - -func newKyvernoV1(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.KyvernoV1Interface { - return &wrappedKyvernoV1{inner} -} -func (c *wrappedKyvernoV1) ClusterPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { - return newKyvernoV1ClusterPolicies(c.inner.ClusterPolicies()) -} -func (c *wrappedKyvernoV1) GenerateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { - return newKyvernoV1GenerateRequests(c.inner.GenerateRequests(namespace)) -} -func (c *wrappedKyvernoV1) Policies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { - return newKyvernoV1Policies(c.inner.Policies(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1alpha1 wrapper -type wrappedKyvernoV1alpha1 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface -} - -func newKyvernoV1alpha1(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.KyvernoV1alpha1Interface { - return &wrappedKyvernoV1alpha1{inner} -} -func (c *wrappedKyvernoV1alpha1) CleanupPolicies(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { - return newKyvernoV1alpha1CleanupPolicies(c.inner.CleanupPolicies(namespace)) -} -func (c *wrappedKyvernoV1alpha1) ClusterCleanupPolicies() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { - return newKyvernoV1alpha1ClusterCleanupPolicies(c.inner.ClusterCleanupPolicies()) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1alpha1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1alpha2 wrapper -type wrappedKyvernoV1alpha2 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface -} - -func newKyvernoV1alpha2(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.KyvernoV1alpha2Interface { - return &wrappedKyvernoV1alpha2{inner} -} -func (c *wrappedKyvernoV1alpha2) AdmissionReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { - return newKyvernoV1alpha2AdmissionReports(c.inner.AdmissionReports(namespace)) -} -func (c *wrappedKyvernoV1alpha2) BackgroundScanReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { - return newKyvernoV1alpha2BackgroundScanReports(c.inner.BackgroundScanReports(namespace)) -} -func (c *wrappedKyvernoV1alpha2) ClusterAdmissionReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { - return newKyvernoV1alpha2ClusterAdmissionReports(c.inner.ClusterAdmissionReports()) -} -func (c *wrappedKyvernoV1alpha2) ClusterBackgroundScanReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { - return newKyvernoV1alpha2ClusterBackgroundScanReports(c.inner.ClusterBackgroundScanReports()) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1alpha2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1beta1 wrapper -type wrappedKyvernoV1beta1 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface -} - -func newKyvernoV1beta1(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.KyvernoV1beta1Interface { - return &wrappedKyvernoV1beta1{inner} -} -func (c *wrappedKyvernoV1beta1) UpdateRequests(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { - return newKyvernoV1beta1UpdateRequests(c.inner.UpdateRequests(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedKyvernoV1beta1) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedWgpolicyk8sV1alpha2 wrapper -type wrappedWgpolicyk8sV1alpha2 struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface -} - -func newWgpolicyk8sV1alpha2(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.Wgpolicyk8sV1alpha2Interface { - return &wrappedWgpolicyk8sV1alpha2{inner} -} -func (c *wrappedWgpolicyk8sV1alpha2) ClusterPolicyReports() github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { - return newWgpolicyk8sV1alpha2ClusterPolicyReports(c.inner.ClusterPolicyReports()) -} -func (c *wrappedWgpolicyk8sV1alpha2) PolicyReports(namespace string) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { - return newWgpolicyk8sV1alpha2PolicyReports(c.inner.PolicyReports(namespace)) -} - -// RESTClient is NOT instrumented -func (c *wrappedWgpolicyk8sV1alpha2) RESTClient() k8s_io_client_go_rest.Interface { - return c.inner.RESTClient() -} - -// wrappedKyvernoV1ClusterPolicies wrapper -type wrappedKyvernoV1ClusterPolicies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface -} - -func newKyvernoV1ClusterPolicies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.ClusterPolicyInterface { - return &wrappedKyvernoV1ClusterPolicies{inner} -} -func (c *wrappedKyvernoV1ClusterPolicies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1ClusterPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1ClusterPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1ClusterPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1ClusterPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1ClusterPolicies) 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_v1.ClusterPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1ClusterPolicies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1ClusterPolicies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.ClusterPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1ClusterPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/ClusterPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1GenerateRequests wrapper -type wrappedKyvernoV1GenerateRequests struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface -} - -func newKyvernoV1GenerateRequests(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.GenerateRequestInterface { - return &wrappedKyvernoV1GenerateRequests{inner} -} -func (c *wrappedKyvernoV1GenerateRequests) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1GenerateRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1GenerateRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1GenerateRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1GenerateRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequestList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1GenerateRequests) 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_v1.GenerateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1GenerateRequests) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1GenerateRequests) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.GenerateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1GenerateRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/GenerateRequests/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "GenerateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "GenerateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1Policies wrapper -type wrappedKyvernoV1Policies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface -} - -func newKyvernoV1Policies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1.PolicyInterface { - return &wrappedKyvernoV1Policies{inner} -} -func (c *wrappedKyvernoV1Policies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1Policies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1Policies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1Policies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1Policies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.PolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1Policies) 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_v1.Policy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1Policies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1Policies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1.Policy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1.Policy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1Policies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1/Policies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1"), - go_opentelemetry_io_otel_attribute.String("resource", "Policies"), - go_opentelemetry_io_otel_attribute.String("kind", "Policy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1alpha1CleanupPolicies wrapper -type wrappedKyvernoV1alpha1CleanupPolicies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface -} - -func newKyvernoV1alpha1CleanupPolicies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.CleanupPolicyInterface { - return &wrappedKyvernoV1alpha1CleanupPolicies{inner} -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) 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_v1alpha1.CleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.CleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1CleanupPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/CleanupPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "CleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "CleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1alpha1ClusterCleanupPolicies wrapper -type wrappedKyvernoV1alpha1ClusterCleanupPolicies struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface -} - -func newKyvernoV1alpha1ClusterCleanupPolicies(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha1.ClusterCleanupPolicyInterface { - return &wrappedKyvernoV1alpha1ClusterCleanupPolicies{inner} -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicyList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) 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_v1alpha1.ClusterCleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha1.ClusterCleanupPolicy, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha1ClusterCleanupPolicies) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha1/ClusterCleanupPolicies/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha1"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterCleanupPolicies"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterCleanupPolicy"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1alpha2AdmissionReports wrapper -type wrappedKyvernoV1alpha2AdmissionReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface -} - -func newKyvernoV1alpha2AdmissionReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.AdmissionReportInterface { - return &wrappedKyvernoV1alpha2AdmissionReports{inner} -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReportList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) 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_v1alpha2.AdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.AdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2AdmissionReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/AdmissionReports/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "AdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "AdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1alpha2BackgroundScanReports wrapper -type wrappedKyvernoV1alpha2BackgroundScanReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface -} - -func newKyvernoV1alpha2BackgroundScanReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.BackgroundScanReportInterface { - return &wrappedKyvernoV1alpha2BackgroundScanReports{inner} -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReportList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) 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_v1alpha2.BackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.BackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2BackgroundScanReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/BackgroundScanReports/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "BackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "BackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1alpha2ClusterAdmissionReports wrapper -type wrappedKyvernoV1alpha2ClusterAdmissionReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface -} - -func newKyvernoV1alpha2ClusterAdmissionReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterAdmissionReportInterface { - return &wrappedKyvernoV1alpha2ClusterAdmissionReports{inner} -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReportList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) 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_v1alpha2.ClusterAdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterAdmissionReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterAdmissionReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterAdmissionReports/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterAdmissionReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterAdmissionReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1alpha2ClusterBackgroundScanReports wrapper -type wrappedKyvernoV1alpha2ClusterBackgroundScanReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface -} - -func newKyvernoV1alpha2ClusterBackgroundScanReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1alpha2.ClusterBackgroundScanReportInterface { - return &wrappedKyvernoV1alpha2ClusterBackgroundScanReports{inner} -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReportList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) 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_v1alpha2.ClusterBackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1alpha2.ClusterBackgroundScanReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1alpha2ClusterBackgroundScanReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1alpha2/ClusterBackgroundScanReports/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterBackgroundScanReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterBackgroundScanReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedKyvernoV1beta1UpdateRequests wrapper -type wrappedKyvernoV1beta1UpdateRequests struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface -} - -func newKyvernoV1beta1UpdateRequests(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_kyverno_v1beta1.UpdateRequestInterface { - return &wrappedKyvernoV1beta1UpdateRequests{inner} -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/Create", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/Delete", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/Get", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequestList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/List", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) 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_v1beta1.UpdateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/Patch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/Update", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) UpdateStatus(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_kyverno_v1beta1.UpdateRequest, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/UpdateStatus", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedKyvernoV1beta1UpdateRequests) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE KyvernoV1beta1/UpdateRequests/Watch", - go_opentelemetry_io_otel_attribute.String("client", "KyvernoV1beta1"), - go_opentelemetry_io_otel_attribute.String("resource", "UpdateRequests"), - go_opentelemetry_io_otel_attribute.String("kind", "UpdateRequest"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedWgpolicyk8sV1alpha2ClusterPolicyReports wrapper -type wrappedWgpolicyk8sV1alpha2ClusterPolicyReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface -} - -func newWgpolicyk8sV1alpha2ClusterPolicyReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.ClusterPolicyReportInterface { - return &wrappedWgpolicyk8sV1alpha2ClusterPolicyReports{inner} -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/Create", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/Delete", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/Get", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReportList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/List", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) 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_policyreport_v1alpha2.ClusterPolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/Patch", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.ClusterPolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/Update", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2ClusterPolicyReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/ClusterPolicyReports/Watch", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "ClusterPolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "ClusterPolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} - -// wrappedWgpolicyk8sV1alpha2PolicyReports wrapper -type wrappedWgpolicyk8sV1alpha2PolicyReports struct { - inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface -} - -func newWgpolicyk8sV1alpha2PolicyReports(inner github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface) github_com_kyverno_kyverno_pkg_client_clientset_versioned_typed_policyreport_v1alpha2.PolicyReportInterface { - return &wrappedWgpolicyk8sV1alpha2PolicyReports{inner} -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Create(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.CreateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/Create", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Create(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Delete(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/Delete", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.Delete(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) DeleteCollection(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) error { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/DeleteCollection", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0 := c.inner.DeleteCollection(arg0, arg1, arg2) - if ret0 != nil { - span.RecordError(ret0) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret0.Error()) - } - return ret0 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Get(arg0 context.Context, arg1 string, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.GetOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/Get", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Get(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) List(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReportList, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/List", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.List(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) 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_policyreport_v1alpha2.PolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/Patch", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Patch(arg0, arg1, arg2, arg3, arg4, arg5...) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Update(arg0 context.Context, arg1 *github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*github_com_kyverno_kyverno_api_policyreport_v1alpha2.PolicyReport, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/Update", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Update(arg0, arg1, arg2) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -} -func (c *wrappedWgpolicyk8sV1alpha2PolicyReports) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) { - ctx, span := github_com_kyverno_kyverno_pkg_tracing.StartSpan( - arg0, - "pkg/clients/middleware/tracing/kyverno", - "KUBE Wgpolicyk8sV1alpha2/PolicyReports/Watch", - go_opentelemetry_io_otel_attribute.String("client", "Wgpolicyk8sV1alpha2"), - go_opentelemetry_io_otel_attribute.String("resource", "PolicyReports"), - go_opentelemetry_io_otel_attribute.String("kind", "PolicyReport"), - ) - defer span.End() - arg0 = ctx - ret0, ret1 := c.inner.Watch(arg0, arg1) - if ret1 != nil { - span.RecordError(ret1) - span.SetStatus(go_opentelemetry_io_otel_codes.Ok, ret1.Error()) - } - return ret0, ret1 -}