@@ -35,11 +35,6 @@ type InferencePoolImport struct {
35
35
// +optional
36
36
metav1.ObjectMeta `json:"metadata,omitempty"`
37
37
38
- // Spec defines the desired state of the InferencePoolImport.
39
- //
40
- // +required
41
- Spec InferencePoolImportSpec `json:"spec,omitzero"`
42
-
43
38
// Status defines the observed state of the InferencePoolImport.
44
39
//
45
40
// +optional
@@ -56,90 +51,93 @@ type InferencePoolImportList struct {
56
51
Items []InferencePoolImport `json:"items"`
57
52
}
58
53
59
- // InferencePoolImportSpec defines the desired state of the InferencePoolImport.
60
- type InferencePoolImportSpec struct {}
61
-
62
54
// InferencePoolImportStatus defines the observed state of the InferencePoolImport.
63
55
type InferencePoolImportStatus struct {
64
- // Controllers is a list of controllers that are responsible for managing the InferencePoolImport.
65
- //
56
+ // Controllers is a list of controllers that are responsible for managing the InferencePoolImport.
57
+ //
66
58
// +listType=map
67
59
// +listMapKey=name
68
- // +kubebuilder:validation:MaxItems=8
69
- // +kubebuilder:validation:Required
70
- Controllers []ImportController `json:"controllers"`
60
+ // +kubebuilder:validation:MaxItems=8
61
+ // +kubebuilder:validation:Required
62
+ Controllers []ImportController `json:"controllers"`
71
63
}
72
64
73
65
// ImportController defines a controller that is responsible for managing the InferencePoolImport.
74
66
type ImportController struct {
75
- // Name is a domain/path string that indicates the name of the controller that manages the
76
- // InferencePoolImport. Name corresponds to the GatewayClass controllerName field when the
77
- // controller will manage parents of type "Gateway". Otherwise, the name is implementation-specific.
78
- //
79
- // Example: "example.net/import-controller".
80
- //
81
- // The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes
82
- // names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
83
- //
84
- // A controller MUST populate this field when writing status and ensure that entries to status
85
- // populated with their controller name are removed when they are no longer necessary.
86
- //
87
- // +required
88
- Name ControllerName `json:"name"`
89
-
90
- // ExportingClusters is a list of clusters that exported the InferencePool(s) that back the
91
- // InferencePoolImport. Required when the controller is responsible for CRUD'ing the InferencePoolImport
92
- // from the exported InferencePool(s).
93
- //
94
- // +optional
95
- ExportingClusters []ExportingCluster `json:"exportingClusters,omitempty"`
96
-
97
- // Parents is a list of parent resources, typically Gateways, that are associated with the
98
- // InferencePoolImport, and the status of the InferencePoolImport with respect to each parent.
67
+ // Name is a domain/path string that indicates the name of the controller that manages the
68
+ // InferencePoolImport. Name corresponds to the GatewayClass controllerName field when the
69
+ // controller will manage parents of type "Gateway". Otherwise, the name is implementation-specific.
70
+ //
71
+ // Example: "example.net/import-controller".
72
+ //
73
+ // The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes
74
+ // names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
75
+ //
76
+ // A controller MUST populate this field when writing status and ensure that entries to status
77
+ // populated with their controller name are removed when they are no longer necessary.
78
+ //
79
+ // +required
80
+ Name ControllerName `json:"name"`
81
+
82
+ // ExportingClusters is a list of clusters that exported the InferencePool(s) that back the
83
+ // InferencePoolImport. Required when the controller is responsible for CRUD'ing the InferencePoolImport
84
+ // from the exported InferencePool(s).
85
+ //
86
+ // +optional
87
+ ExportingClusters []ExportingCluster `json:"exportingClusters,omitempty"`
88
+
89
+ // Parents is a list of parent resources, typically Gateways, that are associated with the
90
+ // InferencePoolImport, and the status of the InferencePoolImport with respect to each parent.
99
91
//
100
92
// Ancestor would be a more accurate name, but Parent is consistent with InferencePool terminology.
101
- //
102
- // Required when the controller manages the InferencePoolImport as an HTTPRoute backendRef. The controller
103
- // must add an entry for each parent it manages and remove the parent entry when the controller no longer
104
- // considers the InferencePoolImport to be associated with that parent.
105
- //
106
- // +optional
107
- // +listType=atomic
108
- Parents []v1.ParentStatus `json:"parents,omitempty"`
109
-
110
- // Conditions track the state of the InferencePoolImport.
111
- //
112
- // Known condition types are:
113
- //
114
- // * "Accepted"
115
- //
116
- // +optional
117
- // +listType=map
118
- // +listMapKey=type
119
- // +kubebuilder:validation:MaxItems=8
120
- Conditions []metav1.Condition `json:"conditions,omitempty"`
93
+ //
94
+ // Required when the controller manages the InferencePoolImport as an HTTPRoute backendRef. The controller
95
+ // must add an entry for each parent it manages and remove the parent entry when the controller no longer
96
+ // considers the InferencePoolImport to be associated with that parent.
97
+ //
98
+ // +optional
99
+ // +listType=atomic
100
+ Parents []v1.ParentStatus `json:"parents,omitempty"`
101
+
102
+ // Conditions track the state of the InferencePoolImport.
103
+ //
104
+ // Known condition types are:
105
+ //
106
+ // * "Accepted"
107
+ //
108
+ // +optional
109
+ // +listType=map
110
+ // +listMapKey=type
111
+ // +kubebuilder:validation:MaxItems=8
112
+ Conditions []metav1.Condition `json:"conditions,omitempty"`
121
113
}
122
114
123
115
// ControllerName is the name of a controller that manages a resource. It must be a domain prefixed path.
124
116
//
125
117
// Valid values include:
126
118
//
127
- // * "example.com/bar"
119
+ // - "example.com/bar"
128
120
//
129
121
// Invalid values include:
130
122
//
131
- // * "example.com" - must include path
132
- // * "foo.example.com" - must include path
123
+ // - "example.com" - must include path
124
+ // - "foo.example.com" - must include path
133
125
//
134
126
// +kubebuilder:validation:MinLength=1
135
127
// +kubebuilder:validation:MaxLength=253
136
128
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$`
137
129
type ControllerName string
138
130
139
- // ExportingCluster defines a cluster that exported the InferencePool associated to this InferencePoolImport.
131
+ // ClusterName is the name of a cluster that exported the InferencePool.
132
+ //
133
+ // +kubebuilder:validation:MinLength=1
134
+ // +kubebuilder:validation:MaxLength=253
135
+ type ClusterName string
136
+
137
+ // ExportingCluster defines a cluster that exported the InferencePool that backs this InferencePoolImport.
140
138
type ExportingCluster struct {
141
- // Name of the exporting cluster (must be unique within the list).
142
- //
143
- // +kubebuilder:validation:Required
144
- Name string `json:"name"`
139
+ // Name of the exporting cluster (must be unique within the list).
140
+ //
141
+ // +kubebuilder:validation:Required
142
+ Name ClusterName `json:"name"`
145
143
}
0 commit comments