Skip to content

Commit 3f971ca

Browse files
committed
candita feedback
1 parent 3c6bd6e commit 3f971ca

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

api/inferencemodel_types.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const (
144144
// to exist at request time, the error is processed by the Inference Gateway
145145
// and emitted on the appropriate InferenceModel object.
146146
type TargetModel struct {
147-
// Name is the name of the adapter as expected by the ModelServer.
147+
// Name is the name of the adapter or base model, as expected by the ModelServer.
148148
//
149149
// +kubebuilder:validation:MaxLength=253
150150
// +kubebuilder:validation:Required
@@ -174,10 +174,31 @@ type TargetModel struct {
174174

175175
// InferenceModelStatus defines the observed state of InferenceModel
176176
type InferenceModelStatus struct {
177-
// Conditions track the state of the InferencePool.
177+
// Conditions track the state of the InferenceModel.
178178
Conditions []metav1.Condition `json:"conditions,omitempty"`
179179
}
180180

181+
// InferenceModelConditionType is a type of condition for the InferenceModel.
182+
type InferenceModelConditionType string
183+
184+
// InferenceModelConditionReason is the reason for a given InferenceModelConditionType.
185+
type InferenceModelConditionReason string
186+
187+
const (
188+
// This condition indicates whether the model is ready for traffic or not, and why.
189+
ModelConditionReady InferenceModelConditionType = "Ready"
190+
191+
// Desired state. Model is ready for serving with no conflicts or issues.
192+
ModelReasonReady InferenceModelConditionReason = "Ready"
193+
194+
// This reason is used when a given ModelName already exists within the pool.
195+
// Details about naming conflict resolution are on the ModelName field itself.
196+
ModelReasonNameInUse InferenceModelConditionReason = "ModelNameInUse"
197+
198+
// This reason is the initial state, and indicates that the controller has not yet reconciled the InferenceModel.
199+
PoolReasonPending InferenceModelConditionReason = "Pending"
200+
)
201+
181202
func init() {
182203
SchemeBuilder.Register(&InferenceModel{}, &InferenceModelList{})
183204
}

api/inferencepool_types.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ type LabelKey string
9191
// * must be 63 characters or less (can be empty),
9292
// * unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
9393
// * could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
94+
// Labels are case sensitive, so: my-label and My-Label are considered distinct.
9495
//
9596
// Valid values include:
9697
//
@@ -109,6 +110,26 @@ type InferencePoolStatus struct {
109110
Conditions []metav1.Condition `json:"conditions,omitempty"`
110111
}
111112

113+
// InferencePoolConditionType is a type of condition for the InferencePool
114+
type InferencePoolConditionType string
115+
116+
// InferencePoolConditionReason is the reason for a given InferencePoolConditionType
117+
type InferencePoolConditionReason string
118+
119+
const (
120+
// This condition indicates whether the pool is ready for traffic or not, and why.
121+
PoolConditionReady InferencePoolConditionType = "Ready"
122+
123+
// Desired state. The pool and its components are initialized and ready for traffic.
124+
PoolReasonReady InferencePoolConditionReason = "Ready"
125+
126+
// This reason is used when the EPP has not yet passed health checks, or has started failing them.
127+
PoolReasonEPPNotHealthy InferencePoolConditionReason = "EndpointPickerNotHealthy"
128+
129+
// This reason is the initial state, and indicates that the controller has not yet reconciled this pool.
130+
PoolReasonPending InferencePoolConditionReason = "Pending"
131+
)
132+
112133
func init() {
113134
SchemeBuilder.Register(&InferencePool{}, &InferencePoolList{})
114135
}

0 commit comments

Comments
 (0)