From efe2d857075a9ac2f91a1b71aa5134f8a10b3c9f Mon Sep 17 00:00:00 2001 From: Kellen Swain Date: Wed, 4 Dec 2024 21:07:38 +0000 Subject: [PATCH] Makefile fixes with generated output --- Makefile | 2 +- .../api/v1alpha1/llmserverpool.go | 40 +++++++++---------- .../api/v1alpha1/llmservice.go | 40 +++++++++---------- .../applyconfiguration/internal/internal.go | 4 +- client-go/clientset/versioned/clientset.go | 4 +- .../typed/api/v1alpha1/api_client.go | 8 ++-- .../api/v1alpha1/fake/fake_llmserverpool.go | 4 +- .../api/v1alpha1/fake/fake_llmservice.go | 4 +- .../typed/api/v1alpha1/llmserverpool.go | 30 +++++++------- .../typed/api/v1alpha1/llmservice.go | 30 +++++++------- .../api/v1alpha1/llmserverpool.go | 16 ++++---- .../api/v1alpha1/llmservice.go | 16 ++++---- .../informers/externalversions/generic.go | 2 +- .../listers/api/v1alpha1/llmserverpool.go | 22 +++++----- client-go/listers/api/v1alpha1/llmservice.go | 22 +++++----- hack/update-codegen.sh | 2 +- 16 files changed, 123 insertions(+), 123 deletions(-) diff --git a/Makefile b/Makefile index 4afbb6f0..de28e47f 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate -generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. +generate: controller-gen code-generator ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." ./hack/update-codegen.sh diff --git a/client-go/applyconfiguration/api/v1alpha1/llmserverpool.go b/client-go/applyconfiguration/api/v1alpha1/llmserverpool.go index 1ce7f90c..2c70492c 100644 --- a/client-go/applyconfiguration/api/v1alpha1/llmserverpool.go +++ b/client-go/applyconfiguration/api/v1alpha1/llmserverpool.go @@ -47,7 +47,7 @@ func LLMServerPool(name, namespace string) *LLMServerPoolApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithKind(value string) *LLMServerPoolApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value + b.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *LLMServerPoolApplyConfiguration) WithKind(value string) *LLMServerPoolA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithAPIVersion(value string) *LLMServerPoolApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value + b.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *LLMServerPoolApplyConfiguration) WithAPIVersion(value string) *LLMServe // If called multiple times, the Name field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithName(value string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value + b.Name = &value return b } @@ -73,7 +73,7 @@ func (b *LLMServerPoolApplyConfiguration) WithName(value string) *LLMServerPoolA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithGenerateName(value string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value + b.GenerateName = &value return b } @@ -82,7 +82,7 @@ func (b *LLMServerPoolApplyConfiguration) WithGenerateName(value string) *LLMSer // If called multiple times, the Namespace field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithNamespace(value string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value + b.Namespace = &value return b } @@ -91,7 +91,7 @@ func (b *LLMServerPoolApplyConfiguration) WithNamespace(value string) *LLMServer // If called multiple times, the UID field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithUID(value types.UID) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value + b.UID = &value return b } @@ -100,7 +100,7 @@ func (b *LLMServerPoolApplyConfiguration) WithUID(value types.UID) *LLMServerPoo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithResourceVersion(value string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value + b.ResourceVersion = &value return b } @@ -109,7 +109,7 @@ func (b *LLMServerPoolApplyConfiguration) WithResourceVersion(value string) *LLM // If called multiple times, the Generation field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithGeneration(value int64) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value + b.Generation = &value return b } @@ -118,7 +118,7 @@ func (b *LLMServerPoolApplyConfiguration) WithGeneration(value int64) *LLMServer // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + b.CreationTimestamp = &value return b } @@ -127,7 +127,7 @@ func (b *LLMServerPoolApplyConfiguration) WithCreationTimestamp(value metav1.Tim // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + b.DeletionTimestamp = &value return b } @@ -136,7 +136,7 @@ func (b *LLMServerPoolApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *LLMServerPoolApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + b.DeletionGracePeriodSeconds = &value return b } @@ -146,11 +146,11 @@ func (b *LLMServerPoolApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *LLMServerPoolApplyConfiguration) WithLabels(entries map[string]string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -161,11 +161,11 @@ func (b *LLMServerPoolApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *LLMServerPoolApplyConfiguration) WithAnnotations(entries map[string]string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -179,7 +179,7 @@ func (b *LLMServerPoolApplyConfiguration) WithOwnerReferences(values ...*v1.Owne if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -190,7 +190,7 @@ func (b *LLMServerPoolApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *LLMServerPoolApplyConfiguration) WithFinalizers(values ...string) *LLMServerPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -220,5 +220,5 @@ func (b *LLMServerPoolApplyConfiguration) WithStatus(value *LLMServerPoolStatusA // GetName retrieves the value of the Name field in the declarative configuration. func (b *LLMServerPoolApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/client-go/applyconfiguration/api/v1alpha1/llmservice.go b/client-go/applyconfiguration/api/v1alpha1/llmservice.go index f1132064..26d9f76f 100644 --- a/client-go/applyconfiguration/api/v1alpha1/llmservice.go +++ b/client-go/applyconfiguration/api/v1alpha1/llmservice.go @@ -47,7 +47,7 @@ func LLMService(name, namespace string) *LLMServiceApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithKind(value string) *LLMServiceApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value + b.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *LLMServiceApplyConfiguration) WithKind(value string) *LLMServiceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithAPIVersion(value string) *LLMServiceApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value + b.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *LLMServiceApplyConfiguration) WithAPIVersion(value string) *LLMServiceA // If called multiple times, the Name field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithName(value string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value + b.Name = &value return b } @@ -73,7 +73,7 @@ func (b *LLMServiceApplyConfiguration) WithName(value string) *LLMServiceApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithGenerateName(value string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value + b.GenerateName = &value return b } @@ -82,7 +82,7 @@ func (b *LLMServiceApplyConfiguration) WithGenerateName(value string) *LLMServic // If called multiple times, the Namespace field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithNamespace(value string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value + b.Namespace = &value return b } @@ -91,7 +91,7 @@ func (b *LLMServiceApplyConfiguration) WithNamespace(value string) *LLMServiceAp // If called multiple times, the UID field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithUID(value types.UID) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value + b.UID = &value return b } @@ -100,7 +100,7 @@ func (b *LLMServiceApplyConfiguration) WithUID(value types.UID) *LLMServiceApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithResourceVersion(value string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value + b.ResourceVersion = &value return b } @@ -109,7 +109,7 @@ func (b *LLMServiceApplyConfiguration) WithResourceVersion(value string) *LLMSer // If called multiple times, the Generation field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithGeneration(value int64) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value + b.Generation = &value return b } @@ -118,7 +118,7 @@ func (b *LLMServiceApplyConfiguration) WithGeneration(value int64) *LLMServiceAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + b.CreationTimestamp = &value return b } @@ -127,7 +127,7 @@ func (b *LLMServiceApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + b.DeletionTimestamp = &value return b } @@ -136,7 +136,7 @@ func (b *LLMServiceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *LLMServiceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + b.DeletionGracePeriodSeconds = &value return b } @@ -146,11 +146,11 @@ func (b *LLMServiceApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *LLMServiceApplyConfiguration) WithLabels(entries map[string]string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -161,11 +161,11 @@ func (b *LLMServiceApplyConfiguration) WithLabels(entries map[string]string) *LL // overwriting an existing map entries in Annotations field with the same key. func (b *LLMServiceApplyConfiguration) WithAnnotations(entries map[string]string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -179,7 +179,7 @@ func (b *LLMServiceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -190,7 +190,7 @@ func (b *LLMServiceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *LLMServiceApplyConfiguration) WithFinalizers(values ...string) *LLMServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -220,5 +220,5 @@ func (b *LLMServiceApplyConfiguration) WithStatus(value *LLMServiceStatusApplyCo // GetName retrieves the value of the Name field in the declarative configuration. func (b *LLMServiceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/client-go/applyconfiguration/internal/internal.go b/client-go/applyconfiguration/internal/internal.go index 8f24c8ba..69b66345 100644 --- a/client-go/applyconfiguration/internal/internal.go +++ b/client-go/applyconfiguration/internal/internal.go @@ -18,8 +18,8 @@ limitations under the License. package internal import ( - fmt "fmt" - sync "sync" + "fmt" + "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/client-go/clientset/versioned/clientset.go b/client-go/clientset/versioned/clientset.go index 506bce0e..dac47fdc 100644 --- a/client-go/clientset/versioned/clientset.go +++ b/client-go/clientset/versioned/clientset.go @@ -18,8 +18,8 @@ limitations under the License. package versioned import ( - fmt "fmt" - http "net/http" + "fmt" + "net/http" apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned/typed/api/v1alpha1" discovery "k8s.io/client-go/discovery" diff --git a/client-go/clientset/versioned/typed/api/v1alpha1/api_client.go b/client-go/clientset/versioned/typed/api/v1alpha1/api_client.go index e4ad9b19..d8b3a6a8 100644 --- a/client-go/clientset/versioned/typed/api/v1alpha1/api_client.go +++ b/client-go/clientset/versioned/typed/api/v1alpha1/api_client.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - http "net/http" + "net/http" - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" - scheme "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned/scheme" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -89,7 +89,7 @@ func New(c rest.Interface) *ApiV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := apiv1alpha1.SchemeGroupVersion + gv := v1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmserverpool.go b/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmserverpool.go index 9ccf801c..624d546d 100644 --- a/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmserverpool.go +++ b/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmserverpool.go @@ -18,9 +18,9 @@ limitations under the License. package fake import ( - context "context" + "context" json "encoding/json" - fmt "fmt" + "fmt" v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/applyconfiguration/api/v1alpha1" diff --git a/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmservice.go b/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmservice.go index 9e86cd94..fc1c0991 100644 --- a/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmservice.go +++ b/client-go/clientset/versioned/typed/api/v1alpha1/fake/fake_llmservice.go @@ -18,9 +18,9 @@ limitations under the License. package fake import ( - context "context" + "context" json "encoding/json" - fmt "fmt" + "fmt" v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/applyconfiguration/api/v1alpha1" diff --git a/client-go/clientset/versioned/typed/api/v1alpha1/llmserverpool.go b/client-go/clientset/versioned/typed/api/v1alpha1/llmserverpool.go index 2e863410..92097411 100644 --- a/client-go/clientset/versioned/typed/api/v1alpha1/llmserverpool.go +++ b/client-go/clientset/versioned/typed/api/v1alpha1/llmserverpool.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - context "context" + "context" - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" - applyconfigurationapiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/applyconfiguration/api/v1alpha1" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/applyconfiguration/api/v1alpha1" scheme "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,36 +37,36 @@ type LLMServerPoolsGetter interface { // LLMServerPoolInterface has methods to work with LLMServerPool resources. type LLMServerPoolInterface interface { - Create(ctx context.Context, lLMServerPool *apiv1alpha1.LLMServerPool, opts v1.CreateOptions) (*apiv1alpha1.LLMServerPool, error) - Update(ctx context.Context, lLMServerPool *apiv1alpha1.LLMServerPool, opts v1.UpdateOptions) (*apiv1alpha1.LLMServerPool, error) + Create(ctx context.Context, lLMServerPool *v1alpha1.LLMServerPool, opts v1.CreateOptions) (*v1alpha1.LLMServerPool, error) + Update(ctx context.Context, lLMServerPool *v1alpha1.LLMServerPool, opts v1.UpdateOptions) (*v1alpha1.LLMServerPool, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, lLMServerPool *apiv1alpha1.LLMServerPool, opts v1.UpdateOptions) (*apiv1alpha1.LLMServerPool, error) + UpdateStatus(ctx context.Context, lLMServerPool *v1alpha1.LLMServerPool, opts v1.UpdateOptions) (*v1alpha1.LLMServerPool, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1alpha1.LLMServerPool, error) - List(ctx context.Context, opts v1.ListOptions) (*apiv1alpha1.LLMServerPoolList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.LLMServerPool, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.LLMServerPoolList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1alpha1.LLMServerPool, err error) - Apply(ctx context.Context, lLMServerPool *applyconfigurationapiv1alpha1.LLMServerPoolApplyConfiguration, opts v1.ApplyOptions) (result *apiv1alpha1.LLMServerPool, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.LLMServerPool, err error) + Apply(ctx context.Context, lLMServerPool *apiv1alpha1.LLMServerPoolApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.LLMServerPool, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, lLMServerPool *applyconfigurationapiv1alpha1.LLMServerPoolApplyConfiguration, opts v1.ApplyOptions) (result *apiv1alpha1.LLMServerPool, err error) + ApplyStatus(ctx context.Context, lLMServerPool *apiv1alpha1.LLMServerPoolApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.LLMServerPool, err error) LLMServerPoolExpansion } // lLMServerPools implements LLMServerPoolInterface type lLMServerPools struct { - *gentype.ClientWithListAndApply[*apiv1alpha1.LLMServerPool, *apiv1alpha1.LLMServerPoolList, *applyconfigurationapiv1alpha1.LLMServerPoolApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha1.LLMServerPool, *v1alpha1.LLMServerPoolList, *apiv1alpha1.LLMServerPoolApplyConfiguration] } // newLLMServerPools returns a LLMServerPools func newLLMServerPools(c *ApiV1alpha1Client, namespace string) *lLMServerPools { return &lLMServerPools{ - gentype.NewClientWithListAndApply[*apiv1alpha1.LLMServerPool, *apiv1alpha1.LLMServerPoolList, *applyconfigurationapiv1alpha1.LLMServerPoolApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha1.LLMServerPool, *v1alpha1.LLMServerPoolList, *apiv1alpha1.LLMServerPoolApplyConfiguration]( "llmserverpools", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *apiv1alpha1.LLMServerPool { return &apiv1alpha1.LLMServerPool{} }, - func() *apiv1alpha1.LLMServerPoolList { return &apiv1alpha1.LLMServerPoolList{} }), + func() *v1alpha1.LLMServerPool { return &v1alpha1.LLMServerPool{} }, + func() *v1alpha1.LLMServerPoolList { return &v1alpha1.LLMServerPoolList{} }), } } diff --git a/client-go/clientset/versioned/typed/api/v1alpha1/llmservice.go b/client-go/clientset/versioned/typed/api/v1alpha1/llmservice.go index c7832baa..6bf6ed30 100644 --- a/client-go/clientset/versioned/typed/api/v1alpha1/llmservice.go +++ b/client-go/clientset/versioned/typed/api/v1alpha1/llmservice.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - context "context" + "context" - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" - applyconfigurationapiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/applyconfiguration/api/v1alpha1" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/applyconfiguration/api/v1alpha1" scheme "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,36 +37,36 @@ type LLMServicesGetter interface { // LLMServiceInterface has methods to work with LLMService resources. type LLMServiceInterface interface { - Create(ctx context.Context, lLMService *apiv1alpha1.LLMService, opts v1.CreateOptions) (*apiv1alpha1.LLMService, error) - Update(ctx context.Context, lLMService *apiv1alpha1.LLMService, opts v1.UpdateOptions) (*apiv1alpha1.LLMService, error) + Create(ctx context.Context, lLMService *v1alpha1.LLMService, opts v1.CreateOptions) (*v1alpha1.LLMService, error) + Update(ctx context.Context, lLMService *v1alpha1.LLMService, opts v1.UpdateOptions) (*v1alpha1.LLMService, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, lLMService *apiv1alpha1.LLMService, opts v1.UpdateOptions) (*apiv1alpha1.LLMService, error) + UpdateStatus(ctx context.Context, lLMService *v1alpha1.LLMService, opts v1.UpdateOptions) (*v1alpha1.LLMService, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*apiv1alpha1.LLMService, error) - List(ctx context.Context, opts v1.ListOptions) (*apiv1alpha1.LLMServiceList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.LLMService, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.LLMServiceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiv1alpha1.LLMService, err error) - Apply(ctx context.Context, lLMService *applyconfigurationapiv1alpha1.LLMServiceApplyConfiguration, opts v1.ApplyOptions) (result *apiv1alpha1.LLMService, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.LLMService, err error) + Apply(ctx context.Context, lLMService *apiv1alpha1.LLMServiceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.LLMService, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, lLMService *applyconfigurationapiv1alpha1.LLMServiceApplyConfiguration, opts v1.ApplyOptions) (result *apiv1alpha1.LLMService, err error) + ApplyStatus(ctx context.Context, lLMService *apiv1alpha1.LLMServiceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.LLMService, err error) LLMServiceExpansion } // lLMServices implements LLMServiceInterface type lLMServices struct { - *gentype.ClientWithListAndApply[*apiv1alpha1.LLMService, *apiv1alpha1.LLMServiceList, *applyconfigurationapiv1alpha1.LLMServiceApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha1.LLMService, *v1alpha1.LLMServiceList, *apiv1alpha1.LLMServiceApplyConfiguration] } // newLLMServices returns a LLMServices func newLLMServices(c *ApiV1alpha1Client, namespace string) *lLMServices { return &lLMServices{ - gentype.NewClientWithListAndApply[*apiv1alpha1.LLMService, *apiv1alpha1.LLMServiceList, *applyconfigurationapiv1alpha1.LLMServiceApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha1.LLMService, *v1alpha1.LLMServiceList, *apiv1alpha1.LLMServiceApplyConfiguration]( "llmservices", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *apiv1alpha1.LLMService { return &apiv1alpha1.LLMService{} }, - func() *apiv1alpha1.LLMServiceList { return &apiv1alpha1.LLMServiceList{} }), + func() *v1alpha1.LLMService { return &v1alpha1.LLMService{} }, + func() *v1alpha1.LLMServiceList { return &v1alpha1.LLMServiceList{} }), } } diff --git a/client-go/informers/externalversions/api/v1alpha1/llmserverpool.go b/client-go/informers/externalversions/api/v1alpha1/llmserverpool.go index e08bb227..d24208c7 100644 --- a/client-go/informers/externalversions/api/v1alpha1/llmserverpool.go +++ b/client-go/informers/externalversions/api/v1alpha1/llmserverpool.go @@ -18,13 +18,13 @@ limitations under the License. package v1alpha1 import ( - context "context" + "context" time "time" - llminstancegatewayapiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" versioned "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned" internalinterfaces "inference.networking.x-k8s.io/llm-instance-gateway/client-go/informers/externalversions/internalinterfaces" - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/listers/api/v1alpha1" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/listers/api/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -35,7 +35,7 @@ import ( // LLMServerPools. type LLMServerPoolInformer interface { Informer() cache.SharedIndexInformer - Lister() apiv1alpha1.LLMServerPoolLister + Lister() v1alpha1.LLMServerPoolLister } type lLMServerPoolInformer struct { @@ -70,7 +70,7 @@ func NewFilteredLLMServerPoolInformer(client versioned.Interface, namespace stri return client.ApiV1alpha1().LLMServerPools(namespace).Watch(context.TODO(), options) }, }, - &llminstancegatewayapiv1alpha1.LLMServerPool{}, + &apiv1alpha1.LLMServerPool{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *lLMServerPoolInformer) defaultInformer(client versioned.Interface, resy } func (f *lLMServerPoolInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&llminstancegatewayapiv1alpha1.LLMServerPool{}, f.defaultInformer) + return f.factory.InformerFor(&apiv1alpha1.LLMServerPool{}, f.defaultInformer) } -func (f *lLMServerPoolInformer) Lister() apiv1alpha1.LLMServerPoolLister { - return apiv1alpha1.NewLLMServerPoolLister(f.Informer().GetIndexer()) +func (f *lLMServerPoolInformer) Lister() v1alpha1.LLMServerPoolLister { + return v1alpha1.NewLLMServerPoolLister(f.Informer().GetIndexer()) } diff --git a/client-go/informers/externalversions/api/v1alpha1/llmservice.go b/client-go/informers/externalversions/api/v1alpha1/llmservice.go index 7b91175c..501dfcf4 100644 --- a/client-go/informers/externalversions/api/v1alpha1/llmservice.go +++ b/client-go/informers/externalversions/api/v1alpha1/llmservice.go @@ -18,13 +18,13 @@ limitations under the License. package v1alpha1 import ( - context "context" + "context" time "time" - llminstancegatewayapiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" versioned "inference.networking.x-k8s.io/llm-instance-gateway/client-go/clientset/versioned" internalinterfaces "inference.networking.x-k8s.io/llm-instance-gateway/client-go/informers/externalversions/internalinterfaces" - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/listers/api/v1alpha1" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/client-go/listers/api/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -35,7 +35,7 @@ import ( // LLMServices. type LLMServiceInformer interface { Informer() cache.SharedIndexInformer - Lister() apiv1alpha1.LLMServiceLister + Lister() v1alpha1.LLMServiceLister } type lLMServiceInformer struct { @@ -70,7 +70,7 @@ func NewFilteredLLMServiceInformer(client versioned.Interface, namespace string, return client.ApiV1alpha1().LLMServices(namespace).Watch(context.TODO(), options) }, }, - &llminstancegatewayapiv1alpha1.LLMService{}, + &apiv1alpha1.LLMService{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *lLMServiceInformer) defaultInformer(client versioned.Interface, resyncP } func (f *lLMServiceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&llminstancegatewayapiv1alpha1.LLMService{}, f.defaultInformer) + return f.factory.InformerFor(&apiv1alpha1.LLMService{}, f.defaultInformer) } -func (f *lLMServiceInformer) Lister() apiv1alpha1.LLMServiceLister { - return apiv1alpha1.NewLLMServiceLister(f.Informer().GetIndexer()) +func (f *lLMServiceInformer) Lister() v1alpha1.LLMServiceLister { + return v1alpha1.NewLLMServiceLister(f.Informer().GetIndexer()) } diff --git a/client-go/informers/externalversions/generic.go b/client-go/informers/externalversions/generic.go index f3a43267..6c12c7e7 100644 --- a/client-go/informers/externalversions/generic.go +++ b/client-go/informers/externalversions/generic.go @@ -18,7 +18,7 @@ limitations under the License. package externalversions import ( - fmt "fmt" + "fmt" v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/client-go/listers/api/v1alpha1/llmserverpool.go b/client-go/listers/api/v1alpha1/llmserverpool.go index 6cde0df4..fb89b104 100644 --- a/client-go/listers/api/v1alpha1/llmserverpool.go +++ b/client-go/listers/api/v1alpha1/llmserverpool.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" + "k8s.io/client-go/tools/cache" ) // LLMServerPoolLister helps list LLMServerPools. @@ -29,7 +29,7 @@ import ( type LLMServerPoolLister interface { // List lists all LLMServerPools in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*apiv1alpha1.LLMServerPool, err error) + List(selector labels.Selector) (ret []*v1alpha1.LLMServerPool, err error) // LLMServerPools returns an object that can list and get LLMServerPools. LLMServerPools(namespace string) LLMServerPoolNamespaceLister LLMServerPoolListerExpansion @@ -37,17 +37,17 @@ type LLMServerPoolLister interface { // lLMServerPoolLister implements the LLMServerPoolLister interface. type lLMServerPoolLister struct { - listers.ResourceIndexer[*apiv1alpha1.LLMServerPool] + listers.ResourceIndexer[*v1alpha1.LLMServerPool] } // NewLLMServerPoolLister returns a new LLMServerPoolLister. func NewLLMServerPoolLister(indexer cache.Indexer) LLMServerPoolLister { - return &lLMServerPoolLister{listers.New[*apiv1alpha1.LLMServerPool](indexer, apiv1alpha1.Resource("llmserverpool"))} + return &lLMServerPoolLister{listers.New[*v1alpha1.LLMServerPool](indexer, v1alpha1.Resource("llmserverpool"))} } // LLMServerPools returns an object that can list and get LLMServerPools. func (s *lLMServerPoolLister) LLMServerPools(namespace string) LLMServerPoolNamespaceLister { - return lLMServerPoolNamespaceLister{listers.NewNamespaced[*apiv1alpha1.LLMServerPool](s.ResourceIndexer, namespace)} + return lLMServerPoolNamespaceLister{listers.NewNamespaced[*v1alpha1.LLMServerPool](s.ResourceIndexer, namespace)} } // LLMServerPoolNamespaceLister helps list and get LLMServerPools. @@ -55,15 +55,15 @@ func (s *lLMServerPoolLister) LLMServerPools(namespace string) LLMServerPoolName type LLMServerPoolNamespaceLister interface { // List lists all LLMServerPools in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*apiv1alpha1.LLMServerPool, err error) + List(selector labels.Selector) (ret []*v1alpha1.LLMServerPool, err error) // Get retrieves the LLMServerPool from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*apiv1alpha1.LLMServerPool, error) + Get(name string) (*v1alpha1.LLMServerPool, error) LLMServerPoolNamespaceListerExpansion } // lLMServerPoolNamespaceLister implements the LLMServerPoolNamespaceLister // interface. type lLMServerPoolNamespaceLister struct { - listers.ResourceIndexer[*apiv1alpha1.LLMServerPool] + listers.ResourceIndexer[*v1alpha1.LLMServerPool] } diff --git a/client-go/listers/api/v1alpha1/llmservice.go b/client-go/listers/api/v1alpha1/llmservice.go index 8dc76fcf..0a2fea03 100644 --- a/client-go/listers/api/v1alpha1/llmservice.go +++ b/client-go/listers/api/v1alpha1/llmservice.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - apiv1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" + v1alpha1 "inference.networking.x-k8s.io/llm-instance-gateway/api/v1alpha1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" + "k8s.io/client-go/tools/cache" ) // LLMServiceLister helps list LLMServices. @@ -29,7 +29,7 @@ import ( type LLMServiceLister interface { // List lists all LLMServices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*apiv1alpha1.LLMService, err error) + List(selector labels.Selector) (ret []*v1alpha1.LLMService, err error) // LLMServices returns an object that can list and get LLMServices. LLMServices(namespace string) LLMServiceNamespaceLister LLMServiceListerExpansion @@ -37,17 +37,17 @@ type LLMServiceLister interface { // lLMServiceLister implements the LLMServiceLister interface. type lLMServiceLister struct { - listers.ResourceIndexer[*apiv1alpha1.LLMService] + listers.ResourceIndexer[*v1alpha1.LLMService] } // NewLLMServiceLister returns a new LLMServiceLister. func NewLLMServiceLister(indexer cache.Indexer) LLMServiceLister { - return &lLMServiceLister{listers.New[*apiv1alpha1.LLMService](indexer, apiv1alpha1.Resource("llmservice"))} + return &lLMServiceLister{listers.New[*v1alpha1.LLMService](indexer, v1alpha1.Resource("llmservice"))} } // LLMServices returns an object that can list and get LLMServices. func (s *lLMServiceLister) LLMServices(namespace string) LLMServiceNamespaceLister { - return lLMServiceNamespaceLister{listers.NewNamespaced[*apiv1alpha1.LLMService](s.ResourceIndexer, namespace)} + return lLMServiceNamespaceLister{listers.NewNamespaced[*v1alpha1.LLMService](s.ResourceIndexer, namespace)} } // LLMServiceNamespaceLister helps list and get LLMServices. @@ -55,15 +55,15 @@ func (s *lLMServiceLister) LLMServices(namespace string) LLMServiceNamespaceList type LLMServiceNamespaceLister interface { // List lists all LLMServices in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*apiv1alpha1.LLMService, err error) + List(selector labels.Selector) (ret []*v1alpha1.LLMService, err error) // Get retrieves the LLMService from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*apiv1alpha1.LLMService, error) + Get(name string) (*v1alpha1.LLMService, error) LLMServiceNamespaceListerExpansion } // lLMServiceNamespaceLister implements the LLMServiceNamespaceLister // interface. type lLMServiceNamespaceLister struct { - listers.ResourceIndexer[*apiv1alpha1.LLMService] + listers.ResourceIndexer[*v1alpha1.LLMService] } diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 6782c3c1..dc19fece 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -20,7 +20,7 @@ set -o pipefail SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. echo "$SCRIPT_ROOT script" -CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)} +CODEGEN_PKG=${2:-bin} echo $CODEGEN_PKG source "${CODEGEN_PKG}/kube_codegen.sh" THIS_PKG="inference.networking.x-k8s.io/llm-instance-gateway"