@@ -13,9 +13,6 @@ import (
13
13
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
14
14
)
15
15
16
- // +kubebuilder:object:root=true
17
- // +kubebuilder:subresource:status
18
-
19
16
// AIGatewayRoute combines multiple AIServiceBackends and attaching them to Gateway(s) resources.
20
17
//
21
18
// This serves as a way to define a "unified" AI API for a Gateway which allows downstream
@@ -41,6 +38,10 @@ import (
41
38
// detail subject to change. If you want to customize the default behavior of the Envoy AI Gateway, you can use these
42
39
// resources as a reference and create your own resources. Alternatively, you can use EnvoyPatchPolicy API of the Envoy
43
40
// Gateway to patch the generated resources. For example, you can insert a custom filter into the filter chain.
41
+ //
42
+ // +kubebuilder:object:root=true
43
+ // +kubebuilder:subresource:status
44
+ // +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[-1:].type`
44
45
type AIGatewayRoute struct {
45
46
metav1.TypeMeta `json:",inline"`
46
47
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -50,15 +51,9 @@ type AIGatewayRoute struct {
50
51
Status AIGatewayRouteStatus `json:"status,omitempty"`
51
52
}
52
53
53
- // AIGatewayRouteStatus contains the conditions by the reconciliation result.
54
- type AIGatewayRouteStatus struct {
55
- // Conditions is the list of conditions by the reconciliation result.
56
- Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
57
- }
58
-
59
- // +kubebuilder:object:root=true
60
-
61
54
// AIGatewayRouteList contains a list of AIGatewayRoute.
55
+ //
56
+ // +kubebuilder:object:root=true
62
57
type AIGatewayRouteList struct {
63
58
metav1.TypeMeta `json:",inline"`
64
59
metav1.ListMeta `json:"metadata,omitempty"`
@@ -296,8 +291,6 @@ type AIGatewayFilterConfigExternalProcessor struct {
296
291
// Not sure if it is worth it as we are migrating to dynamic modules.
297
292
}
298
293
299
- // +kubebuilder:object:root=true
300
-
301
294
// AIServiceBackend is a resource that represents a single backend for AIGatewayRoute.
302
295
// A backend is a service that handles traffic with a concrete API specification.
303
296
//
@@ -306,16 +299,22 @@ type AIGatewayFilterConfigExternalProcessor struct {
306
299
// When a backend with an attached AIServiceBackend is used as a routing target in the AIGatewayRoute (more precisely, the
307
300
// HTTPRouteSpec defined in the AIGatewayRoute), the ai-gateway will generate the necessary configuration to do
308
301
// the backend specific logic in the final HTTPRoute.
302
+ //
303
+ // +kubebuilder:object:root=true
304
+ // +kubebuilder:subresource:status
305
+ // +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[-1:].type`
309
306
type AIServiceBackend struct {
310
307
metav1.TypeMeta `json:",inline"`
311
308
metav1.ObjectMeta `json:"metadata,omitempty"`
312
309
// Spec defines the details of AIServiceBackend.
313
310
Spec AIServiceBackendSpec `json:"spec,omitempty"`
311
+ // Status defines the status details of the AIServiceBackend.
312
+ Status AIServiceBackendStatus `json:"status,omitempty"`
314
313
}
315
314
316
- // +kubebuilder:object:root=true
317
-
318
315
// AIServiceBackendList contains a list of AIServiceBackends.
316
+ //
317
+ // +kubebuilder:object:root=true
319
318
type AIServiceBackendList struct {
320
319
metav1.TypeMeta `json:",inline"`
321
320
metav1.ListMeta `json:"metadata,omitempty"`
@@ -403,14 +402,18 @@ const (
403
402
BackendSecurityPolicyTypeAzureCredentials BackendSecurityPolicyType = "AzureCredentials"
404
403
)
405
404
406
- // +kubebuilder:object:root=true
407
-
408
405
// BackendSecurityPolicy specifies configuration for authentication and authorization rules on the traffic
409
406
// exiting the gateway to the backend.
407
+ //
408
+ // +kubebuilder:object:root=true
409
+ // +kubebuilder:subresource:status
410
+ // +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[-1:].type`
410
411
type BackendSecurityPolicy struct {
411
412
metav1.TypeMeta `json:",inline"`
412
413
metav1.ObjectMeta `json:"metadata,omitempty"`
413
414
Spec BackendSecurityPolicySpec `json:"spec,omitempty"`
415
+ // Status defines the status details of the BackendSecurityPolicy.
416
+ Status BackendSecurityPolicyStatus `json:"status,omitempty"`
414
417
}
415
418
416
419
// BackendSecurityPolicySpec specifies authentication rules on access the provider from the Gateway.
@@ -440,9 +443,9 @@ type BackendSecurityPolicySpec struct {
440
443
AzureCredentials * BackendSecurityPolicyAzureCredentials `json:"azureCredentials,omitempty"`
441
444
}
442
445
443
- // +kubebuilder:object:root=true
444
-
445
446
// BackendSecurityPolicyList contains a list of BackendSecurityPolicy
447
+ //
448
+ // +kubebuilder:object:root=true
446
449
type BackendSecurityPolicyList struct {
447
450
metav1.TypeMeta `json:",inline"`
448
451
metav1.ListMeta `json:"metadata,omitempty"`
0 commit comments