From 59d12e3d15ce5e0d215b484a8661bfcee50e4082 Mon Sep 17 00:00:00 2001 From: Daneyon Hansen <daneyon.hansen@solo.io> Date: Thu, 19 Dec 2024 08:53:19 -0800 Subject: [PATCH] Changes the PoolRef field to a value type Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io> --- api/v1alpha1/inferencemodel_types.go | 2 +- api/v1alpha1/zz_generated.deepcopy.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/v1alpha1/inferencemodel_types.go b/api/v1alpha1/inferencemodel_types.go index 3414b797..766ecfef 100644 --- a/api/v1alpha1/inferencemodel_types.go +++ b/api/v1alpha1/inferencemodel_types.go @@ -65,7 +65,7 @@ type InferenceModelSpec struct { // Reference to the inference pool, the pool must exist in the same namespace. // // +kubebuilder:validation:Required - PoolRef *PoolObjectReference `json:"poolRef,omitempty"` + PoolRef PoolObjectReference `json:"poolRef"` } // PoolObjectReference identifies an API object within the namespace of the diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index fd866b35..4f17fbd0 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -97,11 +97,7 @@ func (in *InferenceModelSpec) DeepCopyInto(out *InferenceModelSpec) { *out = make([]TargetModel, len(*in)) copy(*out, *in) } - if in.PoolRef != nil { - in, out := &in.PoolRef, &out.PoolRef - *out = new(PoolObjectReference) - **out = **in - } + out.PoolRef = in.PoolRef } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceModelSpec.