@@ -38,7 +38,7 @@ type InferencePool struct {
3838 // Spec defines the desired state of the InferencePool.
3939 //
4040 // +required
41- Spec InferencePoolSpec `json:"spec"`
41+ Spec InferencePoolSpec `json:"spec,omitzero "`
4242
4343 // Status defines the observed state of the InferencePool.
4444 //
@@ -67,6 +67,7 @@ type InferencePoolSpec struct {
6767 // this configuration into a Service resource.
6868 //
6969 // +required
70+ //nolint:kubeapilinter // ignore kubeapilinter here as we don't want to use pointer here.
7071 Selector LabelSelector `json:"selector"`
7172
7273 // TargetPorts defines a list of ports that are exposed by this InferencePool.
@@ -76,13 +77,14 @@ type InferencePoolSpec struct {
7677 // +kubebuilder:validation:MaxItems=1
7778 // +listType=atomic
7879 // +required
80+ //nolint:kubeapilinter // ignore kubeapilinter here since the field is required and we don't want omitempty tag.
7981 TargetPorts []Port `json:"targetPorts"`
8082
8183 // EndpointPickerRef is a reference to the Endpoint Picker extension and its
8284 // associated configuration.
8385 //
8486 // +required
85- EndpointPickerRef EndpointPickerRef `json:"endpointPickerRef"`
87+ EndpointPickerRef EndpointPickerRef `json:"endpointPickerRef,omitzero "`
8688}
8789
8890// Port defines the network port that will be exposed by this InferencePool.
@@ -91,6 +93,7 @@ type Port struct {
9193 // The number must be in the range 1 to 65535.
9294 //
9395 // +required
96+ //nolint:kubeapilinter // ignore kubeapilinter here since the field is required and we don't want omitempty tag.
9497 Number PortNumber `json:"number"`
9598}
9699
@@ -123,6 +126,7 @@ type EndpointPickerRef struct {
123126 // Name is the name of the referent API object.
124127 //
125128 // +required
129+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer since empty means default value.
126130 Name ObjectName `json:"name"`
127131
128132 // PortNumber is the port number of the Endpoint Picker extension service. When unspecified,
@@ -138,6 +142,7 @@ type EndpointPickerRef struct {
138142 //
139143 // +optional
140144 // +kubebuilder:default="FailClose"
145+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer since empty means default value.
141146 FailureMode * EndpointPickerFailureMode `json:"failureMode,omitempty"`
142147}
143148
@@ -198,7 +203,7 @@ type ParentStatus struct {
198203 // resource, such as a Gateway.
199204 //
200205 // +required
201- ParentRef ParentReference `json:"parentRef"`
206+ ParentRef ParentReference `json:"parentRef,omitzero "`
202207}
203208
204209// InferencePoolConditionType is a type of status condition for the InferencePool.
0 commit comments