diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index d51fecb2924d..8b2f318c2ea1 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -153,17 +153,23 @@ type ControlPlaneTopology struct { // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` + // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$" + // +kubebuilder:validation:Type:=string // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$" + // +kubebuilder:validation:Type:=string // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. + // +kubebuilder:validation:Pattern="^(([1-9][0-9]*(\\.[0-9]+)?|0?\\.[0-9]+)(ns|us|µs|ms|s|m|h))+$" + // +kubebuilder:validation:Type:=string // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml index f8cc44b0464d..7fcc8ba13149 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml @@ -1086,17 +1086,20 @@ spec: NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. + pattern: ^(([1-9][0-9]*(\.[0-9]+)?|0?\.[0-9]+)(ns|us|µs|ms|s|m|h))+$ type: string nodeDrainTimeout: description: |- NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` + pattern: ^(([1-9][0-9]*(\.[0-9]+)?|0?\.[0-9]+)(ns|us|µs|ms|s|m|h))+$ type: string nodeVolumeDetachTimeout: description: |- NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. + pattern: ^(([1-9][0-9]*(\.[0-9]+)?|0?\.[0-9]+)(ns|us|µs|ms|s|m|h))+$ type: string replicas: description: |-