Skip to content

Commit 707ce60

Browse files
committed
API: Adds default status condition to InferencePool
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent 5d39637 commit 707ce60

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

api/v1alpha2/inferencepool_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ type InferencePool struct {
3131
metav1.TypeMeta `json:",inline"`
3232
metav1.ObjectMeta `json:"metadata,omitempty"`
3333

34-
Spec InferencePoolSpec `json:"spec,omitempty"`
34+
Spec InferencePoolSpec `json:"spec,omitempty"`
35+
36+
// Status defines the observed state of InferencePool.
37+
//
38+
// +kubebuilder:default={parent: {{parentRef: {}, conditions: {{type: "Accepted", status: "Unknown", reason: "Pending", message: "Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}}}}
3539
Status InferencePoolStatus `json:"status,omitempty"`
3640
}
3741

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,16 @@ spec:
134134
- targetPortNumber
135135
type: object
136136
status:
137-
description: InferencePoolStatus defines the observed state of InferencePool
137+
default:
138+
parent:
139+
- conditions:
140+
- lastTransitionTime: "1970-01-01T00:00:00Z"
141+
message: Waiting for controller
142+
reason: Pending
143+
status: Unknown
144+
type: Accepted
145+
parentRef: {}
146+
description: Status defines the observed state of InferencePool.
138147
properties:
139148
parent:
140149
description: |-

0 commit comments

Comments
 (0)