1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/pkg/clients/kube/coordinationv1alpha1/client.generated.go
Charles-Edouard Brétéché f87fa52cb7
feat: bump to k8s 1.31 (#10938)
* feat: bump to k8s 1.31

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* tidy

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* mod

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix otel

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix otel schema

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* update linter

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: fix image verification tests

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

* linter issues

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* cel change

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-08-28 17:09:58 +00:00

59 lines
2.7 KiB
Go

package client
import (
"github.com/go-logr/logr"
leasecandidates "github.com/kyverno/kyverno/pkg/clients/kube/coordinationv1alpha1/leasecandidates"
"github.com/kyverno/kyverno/pkg/metrics"
k8s_io_client_go_kubernetes_typed_coordination_v1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1"
"k8s.io/client-go/rest"
)
func WithMetrics(inner k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface, metrics metrics.MetricsConfigManager, clientType metrics.ClientType) k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface {
return &withMetrics{inner, metrics, clientType}
}
func WithTracing(inner k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface, client string) k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface {
return &withTracing{inner, client}
}
func WithLogging(inner k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface, logger logr.Logger) k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface {
return &withLogging{inner, logger}
}
type withMetrics struct {
inner k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface
metrics metrics.MetricsConfigManager
clientType metrics.ClientType
}
func (c *withMetrics) RESTClient() rest.Interface {
return c.inner.RESTClient()
}
func (c *withMetrics) LeaseCandidates(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.LeaseCandidateInterface {
recorder := metrics.NamespacedClientQueryRecorder(c.metrics, namespace, "LeaseCandidate", c.clientType)
return leasecandidates.WithMetrics(c.inner.LeaseCandidates(namespace), recorder)
}
type withTracing struct {
inner k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface
client string
}
func (c *withTracing) RESTClient() rest.Interface {
return c.inner.RESTClient()
}
func (c *withTracing) LeaseCandidates(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.LeaseCandidateInterface {
return leasecandidates.WithTracing(c.inner.LeaseCandidates(namespace), c.client, "LeaseCandidate")
}
type withLogging struct {
inner k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.CoordinationV1alpha1Interface
logger logr.Logger
}
func (c *withLogging) RESTClient() rest.Interface {
return c.inner.RESTClient()
}
func (c *withLogging) LeaseCandidates(namespace string) k8s_io_client_go_kubernetes_typed_coordination_v1alpha1.LeaseCandidateInterface {
return leasecandidates.WithLogging(c.inner.LeaseCandidates(namespace), c.logger.WithValues("resource", "LeaseCandidates").WithValues("namespace", namespace))
}