@@ -153,17 +153,23 @@ type ControlPlaneTopology struct {
153
153
// NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
154
154
// The default value is 0, meaning that the node can be drained without any time limitations.
155
155
// NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
156
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
157
+ // +kubebuilder:validation:Type:=string
156
158
// +optional
157
159
NodeDrainTimeout * metav1.Duration `json:"nodeDrainTimeout,omitempty"`
158
160
159
161
// NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes
160
162
// to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.
163
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
164
+ // +kubebuilder:validation:Type:=string
161
165
// +optional
162
166
NodeVolumeDetachTimeout * metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"`
163
167
164
168
// NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine
165
169
// hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely.
166
170
// Defaults to 10 seconds.
171
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
172
+ // +kubebuilder:validation:Type:=string
167
173
// +optional
168
174
NodeDeletionTimeout * metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
169
175
@@ -226,17 +232,23 @@ type MachineDeploymentTopology struct {
226
232
// NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
227
233
// The default value is 0, meaning that the node can be drained without any time limitations.
228
234
// NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
235
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
236
+ // +kubebuilder:validation:Type:=string
229
237
// +optional
230
238
NodeDrainTimeout * metav1.Duration `json:"nodeDrainTimeout,omitempty"`
231
239
232
240
// NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes
233
241
// to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.
242
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
243
+ // +kubebuilder:validation:Type:=string
234
244
// +optional
235
245
NodeVolumeDetachTimeout * metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"`
236
246
237
247
// NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine
238
248
// hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely.
239
249
// Defaults to 10 seconds.
250
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
251
+ // +kubebuilder:validation:Type:=string
240
252
// +optional
241
253
NodeDeletionTimeout * metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
242
254
@@ -303,17 +315,23 @@ type MachinePoolTopology struct {
303
315
// NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
304
316
// The default value is 0, meaning that the node can be drained without any time limitations.
305
317
// NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
318
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
319
+ // +kubebuilder:validation:Type:=string
306
320
// +optional
307
321
NodeDrainTimeout * metav1.Duration `json:"nodeDrainTimeout,omitempty"`
308
322
309
323
// NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes
310
324
// to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.
325
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
326
+ // +kubebuilder:validation:Type:=string
311
327
// +optional
312
328
NodeVolumeDetachTimeout * metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"`
313
329
314
330
// NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the MachinePool
315
331
// hosts after the MachinePool is marked for deletion. A duration of 0 will retry deletion indefinitely.
316
332
// Defaults to 10 seconds.
333
+ // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$"
334
+ // +kubebuilder:validation:Type:=string
317
335
// +optional
318
336
NodeDeletionTimeout * metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
319
337
0 commit comments