@@ -43,7 +43,7 @@ type InferencePool struct {
4343 // Status defines the observed state of the InferencePool.
4444 //
4545 // +optional
46- Status InferencePoolStatus `json:"status,omitempty"`
46+ Status * InferencePoolStatus `json:"status,omitempty"`
4747}
4848
4949// InferencePoolList contains a list of InferencePools.
@@ -75,7 +75,7 @@ type InferencePoolSpec struct {
7575 // +kubebuilder:validation:MaxItems=1
7676 // +listType=atomic
7777 // +required
78- TargetPorts []Port `json:"targetPorts,omitzero "`
78+ TargetPorts []Port `json:"targetPorts,omitempty "`
7979
8080 // EndpointPickerRef is a reference to the Endpoint Picker extension and its
8181 // associated configuration.
@@ -90,7 +90,7 @@ type Port struct {
9090 // The number must be in the range 1 to 65535.
9191 //
9292 // +required
93- Number PortNumber `json:"number,omitzero "`
93+ Number PortNumber `json:"number,omitempty "`
9494}
9595
9696// EndpointPickerRef specifies a reference to an Endpoint Picker extension and its
@@ -117,25 +117,28 @@ type EndpointPickerRef struct {
117117 //
118118 // +optional
119119 // +kubebuilder:default=Service
120+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer for optional struct.
120121 Kind * Kind `json:"kind,omitempty"`
121122
122123 // Name is the name of the referent API object.
123124 //
124125 // +required
125- Name ObjectName `json:"name,omitzero "`
126+ Name ObjectName `json:"name,omitempty "`
126127
127128 // PortNumber is the port number of the Endpoint Picker extension service. When unspecified,
128129 // implementations SHOULD infer a default value of 9002 when the kind field is "Service" or
129130 // unspecified (defaults to "Service").
130131 //
131132 // +optional
133+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer for optional struct.
132134 PortNumber * PortNumber `json:"portNumber,omitempty"`
133135
134136 // FailureMode configures how the parent handles the case when the Endpoint Picker extension
135137 // is non-responsive. When unspecified, defaults to "FailClose".
136138 //
137139 // +optional
138140 // +kubebuilder:default="FailClose"
141+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer for optional struct.
139142 FailureMode * EndpointPickerFailureMode `json:"failureMode,omitempty"`
140143}
141144
@@ -186,8 +189,6 @@ type ParentStatus struct {
186189 // +optional
187190 // +listType=map
188191 // +listMapKey=type
189- // +patchStrategy=merge
190- // +patchMergeKey=type
191192 // +kubebuilder:validation:MaxItems=8
192193 Conditions []metav1.Condition `json:"conditions,omitempty"`
193194
@@ -284,12 +285,13 @@ type ParentReference struct {
284285 //
285286 // +optional
286287 // +kubebuilder:default=Gateway
288+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer for optional struct.
287289 Kind * Kind `json:"kind,omitempty"`
288290
289291 // Name is the name of the referent API object.
290292 //
291293 // +required
292- Name ObjectName `json:"name,omitzero "`
294+ Name ObjectName `json:"name,omitempty "`
293295
294296 // Namespace is the namespace of the referenced object. When unspecified, the local
295297 // namespace is inferred.
@@ -300,5 +302,6 @@ type ParentReference struct {
300302 // documentation for details: https://gateway-api.sigs.k8s.io/api-types/referencegrant/
301303 //
302304 // +optional
305+ //nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer for optional struct.
303306 Namespace * Namespace `json:"namespace,omitempty"`
304307}
0 commit comments