From a0cc535e3eaa464b0b28a4dea0b3a614093829be Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 5 Feb 2025 21:36:13 -0500 Subject: [PATCH] upgrade to latest dependencies (#1992) bumping knative.dev/serving 9be0816...a9c5467: > a9c5467 upgrade to latest dependencies (# 15749) bumping knative.dev/networking 4376124...e6fc9bb: > e6fc9bb upgrade to latest dependencies (# 1045) > a4342aa fix codegen by using newer scripts (# 1042) > 5afdd71 upgrade to latest dependencies (# 1044) Signed-off-by: Knative Automation --- go.mod | 4 +- go.sum | 8 +- .../typed/networking/v1alpha1/certificate.go | 146 ++---------------- .../networking/v1alpha1/clusterdomainclaim.go | 119 ++------------ .../typed/networking/v1alpha1/ingress.go | 146 ++---------------- .../networking/v1alpha1/serverlessservice.go | 146 ++---------------- vendor/modules.txt | 4 +- 7 files changed, 47 insertions(+), 526 deletions(-) diff --git a/go.mod b/go.mod index 6b1b631432..3b72bce2d0 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( knative.dev/hack v0.0.0-20250128013659-5f7f0f50e9de knative.dev/pkg v0.0.0-20250203163623-f62a97fc6ad4 knative.dev/reconciler-test v0.0.0-20250129131157-3424ad806aa1 - knative.dev/serving v0.44.1-0.20250204233124-9be081620a54 + knative.dev/serving v0.44.1-0.20250205132413-a9c54670fee6 sigs.k8s.io/yaml v1.4.0 ) @@ -157,7 +157,7 @@ require ( k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - knative.dev/networking v0.0.0-20250128014447-43761241da75 // indirect + knative.dev/networking v0.0.0-20250204225923-e6fc9bbf3fb0 // indirect sigs.k8s.io/controller-runtime v0.7.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index 526f6ac476..6bcbdb1109 100644 --- a/go.sum +++ b/go.sum @@ -1413,14 +1413,14 @@ knative.dev/eventing v0.44.1-0.20250204160923-4a6e7d25c29a h1:3MQtE8N6Dbok1BQgBK knative.dev/eventing v0.44.1-0.20250204160923-4a6e7d25c29a/go.mod h1:Rp0zlXsaHvNkCNqEIXfkcJt8uov6RC2A17oy+/4irqw= knative.dev/hack v0.0.0-20250128013659-5f7f0f50e9de h1:9xWkakMP0rpTpEIi9iRfkDsqhe2XbuyJdBkrlPB2Yjs= knative.dev/hack v0.0.0-20250128013659-5f7f0f50e9de/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY= -knative.dev/networking v0.0.0-20250128014447-43761241da75 h1:w+7I7F3MsFRSffw2HPVtjWOudr6HG8rcQRnJyQdoD6Q= -knative.dev/networking v0.0.0-20250128014447-43761241da75/go.mod h1:AIKYMfZydhwXR/60c/3KXEnqEnH6aNEEqulifdqJVcQ= +knative.dev/networking v0.0.0-20250204225923-e6fc9bbf3fb0 h1:BNRQ5/VTWH+I1getnHXxqhFfMYY1WsL69ZljNjMukpQ= +knative.dev/networking v0.0.0-20250204225923-e6fc9bbf3fb0/go.mod h1:4EjAb5Ij83ABbErDmHewyIOUkEoYZqbXa7hf2hbzvUg= knative.dev/pkg v0.0.0-20250203163623-f62a97fc6ad4 h1:dHkehXNqUAuRtHr0LjGqBC3Uztuj6LcOrOdqCI4c85s= knative.dev/pkg v0.0.0-20250203163623-f62a97fc6ad4/go.mod h1:T4d91cYeEBb9tpz4JqoqA77Px/rhq529heP6NKoknSI= knative.dev/reconciler-test v0.0.0-20250129131157-3424ad806aa1 h1:qMNQRVoi72V3BzAS8Te1aSI1OS9sJFTLatgZ4HgpsPw= knative.dev/reconciler-test v0.0.0-20250129131157-3424ad806aa1/go.mod h1:rpvG6AmoYIJCBs4BJ79KhFaa69pMQVbmncTTmATXyTY= -knative.dev/serving v0.44.1-0.20250204233124-9be081620a54 h1:pTf7mTvBjLbTpL3/qhHtHi7pRfrLBurvzp74t3mozj0= -knative.dev/serving v0.44.1-0.20250204233124-9be081620a54/go.mod h1:YBj+hPllxQSlz1yMqsMtq0ohTVrTpgJYv3P4UxLEiqk= +knative.dev/serving v0.44.1-0.20250205132413-a9c54670fee6 h1:HwprLfyK/QK6ekkG8D+5HHPrdppnCKejRD3WxAEBQxA= +knative.dev/serving v0.44.1-0.20250205132413-a9c54670fee6/go.mod h1:nP/gs8myrVv+rTWj9iJzTX1yPTLylHvQfaKNcQ2H1Hc= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go index 1bf71aabbf..6467589efa 100644 --- a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go +++ b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go @@ -20,12 +20,11 @@ package v1alpha1 import ( "context" - "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" + gentype "k8s.io/client-go/gentype" v1alpha1 "knative.dev/networking/pkg/apis/networking/v1alpha1" scheme "knative.dev/networking/pkg/client/clientset/versioned/scheme" ) @@ -40,6 +39,7 @@ type CertificatesGetter interface { type CertificateInterface interface { Create(ctx context.Context, certificate *v1alpha1.Certificate, opts v1.CreateOptions) (*v1alpha1.Certificate, error) Update(ctx context.Context, certificate *v1alpha1.Certificate, opts v1.UpdateOptions) (*v1alpha1.Certificate, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, certificate *v1alpha1.Certificate, opts v1.UpdateOptions) (*v1alpha1.Certificate, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error @@ -52,144 +52,18 @@ type CertificateInterface interface { // certificates implements CertificateInterface type certificates struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1alpha1.Certificate, *v1alpha1.CertificateList] } // newCertificates returns a Certificates func newCertificates(c *NetworkingV1alpha1Client, namespace string) *certificates { return &certificates{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1alpha1.Certificate, *v1alpha1.CertificateList]( + "certificates", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1alpha1.Certificate { return &v1alpha1.Certificate{} }, + func() *v1alpha1.CertificateList { return &v1alpha1.CertificateList{} }), } } - -// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. -func (c *certificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Certificate, err error) { - result = &v1alpha1.Certificate{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Certificates that match those selectors. -func (c *certificates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CertificateList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.CertificateList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested certificates. -func (c *certificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any. -func (c *certificates) Create(ctx context.Context, certificate *v1alpha1.Certificate, opts v1.CreateOptions) (result *v1alpha1.Certificate, err error) { - result = &v1alpha1.Certificate{} - err = c.client.Post(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificate). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any. -func (c *certificates) Update(ctx context.Context, certificate *v1alpha1.Certificate, opts v1.UpdateOptions) (result *v1alpha1.Certificate, err error) { - result = &v1alpha1.Certificate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificates"). - Name(certificate.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificate). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *certificates) UpdateStatus(ctx context.Context, certificate *v1alpha1.Certificate, opts v1.UpdateOptions) (result *v1alpha1.Certificate, err error) { - result = &v1alpha1.Certificate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificates"). - Name(certificate.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificate). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the certificate and deletes it. Returns an error if one occurs. -func (c *certificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *certificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched certificate. -func (c *certificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Certificate, err error) { - result = &v1alpha1.Certificate{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("certificates"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/clusterdomainclaim.go b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/clusterdomainclaim.go index 75b69d9dfc..a054634b24 100644 --- a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/clusterdomainclaim.go +++ b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/clusterdomainclaim.go @@ -20,12 +20,11 @@ package v1alpha1 import ( "context" - "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" + gentype "k8s.io/client-go/gentype" v1alpha1 "knative.dev/networking/pkg/apis/networking/v1alpha1" scheme "knative.dev/networking/pkg/client/clientset/versioned/scheme" ) @@ -51,118 +50,18 @@ type ClusterDomainClaimInterface interface { // clusterDomainClaims implements ClusterDomainClaimInterface type clusterDomainClaims struct { - client rest.Interface + *gentype.ClientWithList[*v1alpha1.ClusterDomainClaim, *v1alpha1.ClusterDomainClaimList] } // newClusterDomainClaims returns a ClusterDomainClaims func newClusterDomainClaims(c *NetworkingV1alpha1Client) *clusterDomainClaims { return &clusterDomainClaims{ - client: c.RESTClient(), + gentype.NewClientWithList[*v1alpha1.ClusterDomainClaim, *v1alpha1.ClusterDomainClaimList]( + "clusterdomainclaims", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *v1alpha1.ClusterDomainClaim { return &v1alpha1.ClusterDomainClaim{} }, + func() *v1alpha1.ClusterDomainClaimList { return &v1alpha1.ClusterDomainClaimList{} }), } } - -// Get takes name of the clusterDomainClaim, and returns the corresponding clusterDomainClaim object, and an error if there is any. -func (c *clusterDomainClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterDomainClaim, err error) { - result = &v1alpha1.ClusterDomainClaim{} - err = c.client.Get(). - Resource("clusterdomainclaims"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ClusterDomainClaims that match those selectors. -func (c *clusterDomainClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterDomainClaimList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.ClusterDomainClaimList{} - err = c.client.Get(). - Resource("clusterdomainclaims"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested clusterDomainClaims. -func (c *clusterDomainClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("clusterdomainclaims"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a clusterDomainClaim and creates it. Returns the server's representation of the clusterDomainClaim, and an error, if there is any. -func (c *clusterDomainClaims) Create(ctx context.Context, clusterDomainClaim *v1alpha1.ClusterDomainClaim, opts v1.CreateOptions) (result *v1alpha1.ClusterDomainClaim, err error) { - result = &v1alpha1.ClusterDomainClaim{} - err = c.client.Post(). - Resource("clusterdomainclaims"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterDomainClaim). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a clusterDomainClaim and updates it. Returns the server's representation of the clusterDomainClaim, and an error, if there is any. -func (c *clusterDomainClaims) Update(ctx context.Context, clusterDomainClaim *v1alpha1.ClusterDomainClaim, opts v1.UpdateOptions) (result *v1alpha1.ClusterDomainClaim, err error) { - result = &v1alpha1.ClusterDomainClaim{} - err = c.client.Put(). - Resource("clusterdomainclaims"). - Name(clusterDomainClaim.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterDomainClaim). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the clusterDomainClaim and deletes it. Returns an error if one occurs. -func (c *clusterDomainClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("clusterdomainclaims"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *clusterDomainClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("clusterdomainclaims"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched clusterDomainClaim. -func (c *clusterDomainClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterDomainClaim, err error) { - result = &v1alpha1.ClusterDomainClaim{} - err = c.client.Patch(pt). - Resource("clusterdomainclaims"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go index 0f731ddf4d..69d9a0fb50 100644 --- a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go +++ b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go @@ -20,12 +20,11 @@ package v1alpha1 import ( "context" - "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" + gentype "k8s.io/client-go/gentype" v1alpha1 "knative.dev/networking/pkg/apis/networking/v1alpha1" scheme "knative.dev/networking/pkg/client/clientset/versioned/scheme" ) @@ -40,6 +39,7 @@ type IngressesGetter interface { type IngressInterface interface { Create(ctx context.Context, ingress *v1alpha1.Ingress, opts v1.CreateOptions) (*v1alpha1.Ingress, error) Update(ctx context.Context, ingress *v1alpha1.Ingress, opts v1.UpdateOptions) (*v1alpha1.Ingress, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, ingress *v1alpha1.Ingress, opts v1.UpdateOptions) (*v1alpha1.Ingress, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error @@ -52,144 +52,18 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1alpha1.Ingress, *v1alpha1.IngressList] } // newIngresses returns a Ingresses func newIngresses(c *NetworkingV1alpha1Client, namespace string) *ingresses { return &ingresses{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1alpha1.Ingress, *v1alpha1.IngressList]( + "ingresses", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1alpha1.Ingress { return &v1alpha1.Ingress{} }, + func() *v1alpha1.IngressList { return &v1alpha1.IngressList{} }), } } - -// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Ingress, err error) { - result = &v1alpha1.Ingress{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ingresses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.IngressList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Create(ctx context.Context, ingress *v1alpha1.Ingress, opts v1.CreateOptions) (result *v1alpha1.Ingress, err error) { - result = &v1alpha1.Ingress{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ingress). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Update(ctx context.Context, ingress *v1alpha1.Ingress, opts v1.UpdateOptions) (result *v1alpha1.Ingress, err error) { - result = &v1alpha1.Ingress{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ingresses"). - Name(ingress.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ingress). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1alpha1.Ingress, opts v1.UpdateOptions) (result *v1alpha1.Ingress, err error) { - result = &v1alpha1.Ingress{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ingresses"). - Name(ingress.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ingress). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ingresses"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Ingress, err error) { - result = &v1alpha1.Ingress{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ingresses"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go index 973cea6278..2ad81c0f11 100644 --- a/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go +++ b/vendor/knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go @@ -20,12 +20,11 @@ package v1alpha1 import ( "context" - "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" + gentype "k8s.io/client-go/gentype" v1alpha1 "knative.dev/networking/pkg/apis/networking/v1alpha1" scheme "knative.dev/networking/pkg/client/clientset/versioned/scheme" ) @@ -40,6 +39,7 @@ type ServerlessServicesGetter interface { type ServerlessServiceInterface interface { Create(ctx context.Context, serverlessService *v1alpha1.ServerlessService, opts v1.CreateOptions) (*v1alpha1.ServerlessService, error) Update(ctx context.Context, serverlessService *v1alpha1.ServerlessService, opts v1.UpdateOptions) (*v1alpha1.ServerlessService, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, serverlessService *v1alpha1.ServerlessService, opts v1.UpdateOptions) (*v1alpha1.ServerlessService, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error @@ -52,144 +52,18 @@ type ServerlessServiceInterface interface { // serverlessServices implements ServerlessServiceInterface type serverlessServices struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1alpha1.ServerlessService, *v1alpha1.ServerlessServiceList] } // newServerlessServices returns a ServerlessServices func newServerlessServices(c *NetworkingV1alpha1Client, namespace string) *serverlessServices { return &serverlessServices{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1alpha1.ServerlessService, *v1alpha1.ServerlessServiceList]( + "serverlessservices", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1alpha1.ServerlessService { return &v1alpha1.ServerlessService{} }, + func() *v1alpha1.ServerlessServiceList { return &v1alpha1.ServerlessServiceList{} }), } } - -// Get takes name of the serverlessService, and returns the corresponding serverlessService object, and an error if there is any. -func (c *serverlessServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ServerlessService, err error) { - result = &v1alpha1.ServerlessService{} - err = c.client.Get(). - Namespace(c.ns). - Resource("serverlessservices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ServerlessServices that match those selectors. -func (c *serverlessServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServerlessServiceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.ServerlessServiceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("serverlessservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested serverlessServices. -func (c *serverlessServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("serverlessservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a serverlessService and creates it. Returns the server's representation of the serverlessService, and an error, if there is any. -func (c *serverlessServices) Create(ctx context.Context, serverlessService *v1alpha1.ServerlessService, opts v1.CreateOptions) (result *v1alpha1.ServerlessService, err error) { - result = &v1alpha1.ServerlessService{} - err = c.client.Post(). - Namespace(c.ns). - Resource("serverlessservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(serverlessService). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a serverlessService and updates it. Returns the server's representation of the serverlessService, and an error, if there is any. -func (c *serverlessServices) Update(ctx context.Context, serverlessService *v1alpha1.ServerlessService, opts v1.UpdateOptions) (result *v1alpha1.ServerlessService, err error) { - result = &v1alpha1.ServerlessService{} - err = c.client.Put(). - Namespace(c.ns). - Resource("serverlessservices"). - Name(serverlessService.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(serverlessService). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *serverlessServices) UpdateStatus(ctx context.Context, serverlessService *v1alpha1.ServerlessService, opts v1.UpdateOptions) (result *v1alpha1.ServerlessService, err error) { - result = &v1alpha1.ServerlessService{} - err = c.client.Put(). - Namespace(c.ns). - Resource("serverlessservices"). - Name(serverlessService.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(serverlessService). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the serverlessService and deletes it. Returns an error if one occurs. -func (c *serverlessServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("serverlessservices"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *serverlessServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("serverlessservices"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched serverlessService. -func (c *serverlessServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ServerlessService, err error) { - result = &v1alpha1.ServerlessService{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("serverlessservices"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/modules.txt b/vendor/modules.txt index e72688e9ab..4313b1c41c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1511,7 +1511,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/sender # knative.dev/hack v0.0.0-20250128013659-5f7f0f50e9de ## explicit; go 1.21 knative.dev/hack -# knative.dev/networking v0.0.0-20250128014447-43761241da75 +# knative.dev/networking v0.0.0-20250204225923-e6fc9bbf3fb0 ## explicit; go 1.22.7 knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking @@ -1637,7 +1637,7 @@ knative.dev/reconciler-test/pkg/resources/service knative.dev/reconciler-test/pkg/resources/serviceaccount knative.dev/reconciler-test/pkg/state knative.dev/reconciler-test/resources/certificate -# knative.dev/serving v0.44.1-0.20250204233124-9be081620a54 +# knative.dev/serving v0.44.1-0.20250205132413-a9c54670fee6 ## explicit; go 1.22.7 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1