Skip to content

Commit 5317094

Browse files
committed
api review
1 parent 4ffb5f6 commit 5317094

File tree

6 files changed

+293
-292
lines changed

6 files changed

+293
-292
lines changed

api/v1alpha2/doc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v1alpha2 contains API Schema definitions for the
18-
// inference.networking.x-k8s.io API group.
17+
// Package v1 contains API Schema definitions for the
18+
// inference.networking.k8s.io API group.
1919
//
2020
// +k8s:openapi-gen=true
2121
// +kubebuilder:object:generate=true
22-
// +groupName=inference.networking.x-k8s.io
23-
package v1alpha2
22+
// +groupName=inference.networking.k8s.io
23+
package v1

api/v1alpha2/inferencepool_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v1alpha2
17+
package v1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

api/v1alpha2/shared_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v1alpha2
17+
package v1
1818

1919
// Group refers to a Kubernetes Group. It must either be an empty string or a
2020
// RFC 1123 subdomain.
Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
api-approved.kubernetes.io: unapproved, experimental-only
7+
controller-gen.kubebuilder.io/version: v0.16.1
8+
name: inferencepools.inference.networking.k8s.io
9+
spec:
10+
group: inference.networking.k8s.io
11+
names:
12+
kind: InferencePool
13+
listKind: InferencePoolList
14+
plural: inferencepools
15+
singular: inferencepool
16+
scope: Namespaced
17+
versions:
18+
- name: v1
19+
schema:
20+
openAPIV3Schema:
21+
description: |
22+
InferencePool is the Schema for the InferencePools API.
23+
properties:
24+
apiVersion:
25+
description: |-
26+
APIVersion defines the versioned schema of this representation of an object.
27+
Servers should convert recognized schemas to the latest internal value, and
28+
may reject unrecognized values.
29+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
30+
type: string
31+
kind:
32+
description: |-
33+
Kind is a string value representing the REST resource this object represents.
34+
Servers may infer this from the endpoint the client submits requests to.
35+
Cannot be updated.
36+
In CamelCase.
37+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
38+
type: string
39+
metadata:
40+
type: object
41+
spec:
42+
description: InferencePoolSpec defines the desired state of InferencePool
43+
properties:
44+
extensionRef:
45+
description: Extension configures an endpoint picker as an extension
46+
service.
47+
properties:
48+
failureMode:
49+
default: FailClose
50+
description: |-
51+
Configures how the gateway handles the case when the extension is not responsive.
52+
Defaults to failClose.
53+
enum:
54+
- FailOpen
55+
- FailClose
56+
type: string
57+
group:
58+
default: ""
59+
description: |-
60+
Group is the group of the referent.
61+
The default value is "", representing the Core API group.
62+
maxLength: 253
63+
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
64+
type: string
65+
kind:
66+
default: Service
67+
description: |-
68+
Kind is the Kubernetes resource kind of the referent.
69+
70+
Defaults to "Service" when not specified.
71+
72+
ExternalName services can refer to CNAME DNS records that may live
73+
outside of the cluster and as such are difficult to reason about in
74+
terms of conformance. They also may not be safe to forward to (see
75+
CVE-2021-25740 for more information). Implementations MUST NOT
76+
support ExternalName Services.
77+
maxLength: 63
78+
minLength: 1
79+
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
80+
type: string
81+
name:
82+
description: Name is the name of the referent.
83+
maxLength: 253
84+
minLength: 1
85+
type: string
86+
portNumber:
87+
description: |-
88+
The port number on the service running the extension. When unspecified,
89+
implementations SHOULD infer a default value of 9002 when the Kind is
90+
Service.
91+
format: int32
92+
maximum: 65535
93+
minimum: 1
94+
type: integer
95+
required:
96+
- name
97+
type: object
98+
selector:
99+
additionalProperties:
100+
description: |-
101+
LabelValue is the value of a label. This is used for validation
102+
of maps. This matches the Kubernetes label validation rules:
103+
* must be 63 characters or less (can be empty),
104+
* unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
105+
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
106+
107+
Valid values include:
108+
109+
* MyValue
110+
* my.name
111+
* 123-my-value
112+
maxLength: 63
113+
minLength: 0
114+
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
115+
type: string
116+
description: |-
117+
Selector defines a map of labels to watch model server Pods
118+
that should be included in the InferencePool.
119+
In some cases, implementations may translate this field to a Service selector, so this matches the simple
120+
map used for Service selectors instead of the full Kubernetes LabelSelector type.
121+
If specified, it will be applied to match the model server pods in the same namespace as the InferencePool.
122+
Cross namesoace selector is not supported.
123+
type: object
124+
targetPortNumber:
125+
description: |-
126+
TargetPortNumber defines the port number to access the selected model server Pods.
127+
The number must be in the range 1 to 65535.
128+
format: int32
129+
maximum: 65535
130+
minimum: 1
131+
type: integer
132+
required:
133+
- extensionRef
134+
- selector
135+
- targetPortNumber
136+
type: object
137+
status:
138+
default:
139+
parent:
140+
- conditions:
141+
- lastTransitionTime: "1970-01-01T00:00:00Z"
142+
message: Waiting for controller
143+
reason: Pending
144+
status: Unknown
145+
type: Accepted
146+
parentRef:
147+
kind: Status
148+
name: default
149+
description: Status defines the observed state of InferencePool.
150+
properties:
151+
parent:
152+
description: |-
153+
Parents is a list of parent resources (usually Gateways) that are
154+
associated with the InferencePool, and the status of the InferencePool with respect to
155+
each parent.
156+
157+
A maximum of 32 Gateways will be represented in this list. When the list contains
158+
`kind: Status, name: default`, it indicates that the InferencePool is not
159+
associated with any Gateway and a controller must perform the following:
160+
161+
- Remove the parent when setting the "Accepted" condition.
162+
- Add the parent when the controller will no longer manage the InferencePool
163+
and no other parents exist.
164+
items:
165+
description: PoolStatus defines the observed state of InferencePool
166+
from a Gateway.
167+
properties:
168+
conditions:
169+
default:
170+
- lastTransitionTime: "1970-01-01T00:00:00Z"
171+
message: Waiting for controller
172+
reason: Pending
173+
status: Unknown
174+
type: Accepted
175+
description: |-
176+
Conditions track the state of the InferencePool.
177+
178+
Known condition types are:
179+
180+
* "Accepted"
181+
* "ResolvedRefs"
182+
items:
183+
description: Condition contains details for one aspect of
184+
the current state of this API Resource.
185+
properties:
186+
lastTransitionTime:
187+
description: |-
188+
lastTransitionTime is the last time the condition transitioned from one status to another.
189+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
190+
format: date-time
191+
type: string
192+
message:
193+
description: |-
194+
message is a human readable message indicating details about the transition.
195+
This may be an empty string.
196+
maxLength: 32768
197+
type: string
198+
observedGeneration:
199+
description: |-
200+
observedGeneration represents the .metadata.generation that the condition was set based upon.
201+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
202+
with respect to the current state of the instance.
203+
format: int64
204+
minimum: 0
205+
type: integer
206+
reason:
207+
description: |-
208+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
209+
Producers of specific condition types may define expected values and meanings for this field,
210+
and whether the values are considered a guaranteed API.
211+
The value should be a CamelCase string.
212+
This field may not be empty.
213+
maxLength: 1024
214+
minLength: 1
215+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
216+
type: string
217+
status:
218+
description: status of the condition, one of True, False,
219+
Unknown.
220+
enum:
221+
- "True"
222+
- "False"
223+
- Unknown
224+
type: string
225+
type:
226+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
227+
maxLength: 316
228+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
229+
type: string
230+
required:
231+
- lastTransitionTime
232+
- message
233+
- reason
234+
- status
235+
- type
236+
type: object
237+
maxItems: 8
238+
type: array
239+
x-kubernetes-list-map-keys:
240+
- type
241+
x-kubernetes-list-type: map
242+
parentRef:
243+
description: GatewayRef indicates the gateway that observed
244+
state of InferencePool.
245+
properties:
246+
group:
247+
default: gateway.networking.k8s.io
248+
description: Group is the group of the referent.
249+
maxLength: 253
250+
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
251+
type: string
252+
kind:
253+
default: Gateway
254+
description: Kind is kind of the referent. For example "Gateway".
255+
maxLength: 63
256+
minLength: 1
257+
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
258+
type: string
259+
name:
260+
description: Name is the name of the referent.
261+
maxLength: 253
262+
minLength: 1
263+
type: string
264+
namespace:
265+
description: |-
266+
Namespace is the namespace of the referent. If not present,
267+
the namespace of the referent is assumed to be the same as
268+
the namespace of the referring object.
269+
maxLength: 63
270+
minLength: 1
271+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
272+
type: string
273+
required:
274+
- name
275+
type: object
276+
required:
277+
- parentRef
278+
type: object
279+
maxItems: 32
280+
type: array
281+
type: object
282+
type: object
283+
served: true
284+
storage: true
285+
subresources:
286+
status: {}

0 commit comments

Comments
 (0)