Skip to content

Commit 77831c7

Browse files
committed
Renames Pool v1 FailMode Types
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent 77f3345 commit 77831c7

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

api/v1/inferencepool_types.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,22 @@ type EndpointPickerRef struct {
130130
//
131131
// +optional
132132
// +kubebuilder:default="FailClose"
133-
FailureMode ExtensionFailureMode `json:"failureMode,omitempty"`
133+
FailureMode EndpointPickerFailureMode `json:"failureMode,omitempty"`
134134
}
135135

136-
// ExtensionFailureMode defines the options for how the parent handles the case when the extension is not
137-
// responsive.
136+
// EndpointPickerFailureMode defines the options for how the parent handles the case when the
137+
// Endpoint Picker extension is not responsive.
138+
//
138139
// +kubebuilder:validation:Enum=FailOpen;FailClose
139-
type ExtensionFailureMode string
140+
type EndpointPickerFailureMode string
140141

141142
const (
142-
// FailOpen specifies that the proxy should forward the request to an endpoint of its picking when
143-
// the Endpoint Picker fails.
144-
FailOpen ExtensionFailureMode = "FailOpen"
145-
// FailClose specifies that the proxy should drop the request when the Endpoint Picker fails.
146-
FailClose ExtensionFailureMode = "FailClose"
143+
// EndpointPickerFailOpen specifies that the parent should forward the request to an endpoint
144+
// of its picking when the Endpoint Picker extension fails.
145+
EndpointPickerFailOpen EndpointPickerFailureMode = "FailOpen"
146+
// EndpointPickerFailClose specifies that the parent should drop the request when the Endpoint
147+
// Picker extension fails.
148+
EndpointPickerFailClose EndpointPickerFailureMode = "FailClose"
147149
)
148150

149151
// InferencePoolStatus defines the observed state of the InferencePool.

apix/v1alpha2/inferencepool_conversion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func convertExtensionRefToV1(src *Extension) (v1.EndpointPickerRef, error) {
159159
endpointPickerRef.PortNumber = &v1PortNumber
160160
}
161161
if src.FailureMode != nil {
162-
endpointPickerRef.FailureMode = v1.ExtensionFailureMode(*src.FailureMode)
162+
endpointPickerRef.FailureMode = v1.EndpointPickerFailureMode(*src.FailureMode)
163163
}
164164

165165
return endpointPickerRef, nil

apix/v1alpha2/inferencepool_conversion_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var (
3333

3434
v1Group = v1.Group("my-group")
3535
v1Kind = v1.Kind("MyKind")
36-
v1FailureMode = v1.ExtensionFailureMode("Deny")
36+
v1FailureMode = v1.EndpointPickerFailureMode("Deny")
3737
v1PortNumber = v1.PortNumber(9000)
3838
)
3939

client-go/applyconfiguration/api/v1/endpointpickerref.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)