You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apix/v1/inferencepool_types.go
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,7 @@ type Port struct {
96
96
97
97
// EndpointPickerRef specifies a reference to an Endpoint Picker extension and its
98
98
// associated configuration.
99
+
// +kubebuilder:validation:XValidation:rule="self.kind != 'Service' || has(self.port)",message="port is required when kind is 'Service'"
99
100
typeEndpointPickerRefstruct {
100
101
// Group is the group of the referent API object. When unspecified, the default value
101
102
// is "", representing the Core API group.
@@ -125,13 +126,15 @@ type EndpointPickerRef struct {
125
126
// +required
126
127
NameObjectName`json:"name,omitempty"`
127
128
128
-
// PortNumber is the port number of the Endpoint Picker extension service. When unspecified,
129
-
// implementations SHOULD infer a default value of 9002 when the kind field is "Service" or
130
-
// unspecified (defaults to "Service").
129
+
// Port is the port of the Endpoint Picker extension service.
130
+
//
131
+
// Port is required when the referent is a Kubernetes Service. In this
132
+
// case, the port number is the service port number, not the target port.
133
+
// For other resources, destination port might be derived from the referent
134
+
// resource or this field.
131
135
//
132
136
// +optional
133
-
//nolint:kubeapilinter // ignore kubeapilinter here as we want to use pointer as zero means all ports in convention, we don't make to use 0 to indicate not set.
0 commit comments