Skip to content

Commit 754b64b

Browse files
committed
Makes ControllerName optional
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent bfa2326 commit 754b64b

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

api/v1/inferencepool_types.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,12 @@ type ParentStatus struct {
213213
//
214214
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
215215
//
216-
// Controllers MUST populate this field when writing status. Controllers should ensure that
217-
// entries to status populated with their ControllerName are cleaned up when they are no
218-
// longer necessary.
216+
// Controllers MAY populate this field when writing status. When populating this field, controllers
217+
// should ensure that entries to status populated with their ControllerName are cleaned up when they
218+
// are no longer necessary.
219219
//
220-
// +required
221-
//nolint:kubeapilinter // should not have omitempty since the field is required
222-
ControllerName ControllerName `json:"controllerName"`
220+
// +optional
221+
ControllerName ControllerName `json:"controllerName,omitempty"`
223222
}
224223

225224
// ControllerName is the name of a controller that manages ParentStatus. It must be a domain prefixed

config/crd/bases/inference.networking.k8s.io_inferencepools.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ spec:
283283
284284
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
285285
286-
Controllers MUST populate this field when writing status. Controllers should ensure that
287-
entries to status populated with their ControllerName are cleaned up when they are no
288-
longer necessary.
286+
Controllers MAY populate this field when writing status. When populating this field, controllers
287+
should ensure that entries to status populated with their ControllerName are cleaned up when they
288+
are no longer necessary.
289289
maxLength: 253
290290
minLength: 1
291291
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
@@ -336,7 +336,6 @@ spec:
336336
- name
337337
type: object
338338
required:
339-
- controllerName
340339
- parentRef
341340
type: object
342341
maxItems: 32

config/crd/bases/inference.networking.x-k8s.io_inferencepoolimports.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ spec:
248248
249249
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
250250
251-
Controllers MUST populate this field when writing status. Controllers should ensure that
252-
entries to status populated with their ControllerName are cleaned up when they are no
253-
longer necessary.
251+
Controllers MAY populate this field when writing status. When populating this field, controllers
252+
should ensure that entries to status populated with their ControllerName are cleaned up when they
253+
are no longer necessary.
254254
maxLength: 253
255255
minLength: 1
256256
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
@@ -302,7 +302,6 @@ spec:
302302
- name
303303
type: object
304304
required:
305-
- controllerName
306305
- parentRef
307306
type: object
308307
type: array

site-src/reference/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ _Appears in:_
355355
| --- | --- | --- | --- |
356356
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta) array_ | Conditions is a list of status conditions that provide information about the observed<br />state of the InferencePool. This field is required to be set by the controller that<br />manages the InferencePool.<br />Supported condition types are:<br />* "Accepted"<br />* "ResolvedRefs" | | MaxItems: 8 <br /> |
357357
| `parentRef` _[ParentReference](#parentreference)_ | ParentRef is used to identify the parent resource that this status<br />is associated with. It is used to match the InferencePool with the parent<br />resource, such as a Gateway. | | |
358-
| `controllerName` _[ControllerName](#controllername)_ | ControllerName is a domain/path string that indicates the name of the controller that<br />wrote this status. This corresponds with the GatewayClass controllerName field when the<br />parentRef references a Gateway kind.<br />Example: "example.net/gateway-controller".<br />The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names:<br /> https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names<br />Controllers MUST populate this field when writing status. Controllers should ensure that<br />entries to status populated with their ControllerName are cleaned up when they are no<br />longer necessary. | | MaxLength: 253 <br />MinLength: 1 <br />Pattern: `^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$` <br /> |
358+
| `controllerName` _[ControllerName](#controllername)_ | ControllerName is a domain/path string that indicates the name of the controller that<br />wrote this status. This corresponds with the GatewayClass controllerName field when the<br />parentRef references a Gateway kind.<br />Example: "example.net/gateway-controller".<br />The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names:<br /> https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names<br />Controllers MAY populate this field when writing status. When populating this field, controllers<br />should ensure that entries to status populated with their ControllerName are cleaned up when they<br />are no longer necessary. | | MaxLength: 253 <br />MinLength: 1 <br />Pattern: `^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$` <br /> |
359359

360360

361361
#### Port

site-src/reference/x-v1a1-spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ ControllerName is the name of a controller that manages a resource. It must be a
3838

3939
Valid values include:
4040

41-
* "example.com/bar"
41+
- "example.com/bar"
4242

4343
Invalid values include:
4444

45-
* "example.com" - must include path
46-
* "foo.example.com" - must include path
45+
- "example.com" - must include path
46+
- "foo.example.com" - must include path
4747

4848
_Validation:_
4949
- MaxLength: 253

0 commit comments

Comments
 (0)