diff --git a/components/ws-manager-api/go/crd/v1/workspace_types.go b/components/ws-manager-api/go/crd/v1/workspace_types.go index 5ca6cb8b27afea..57fac4962d0d30 100644 --- a/components/ws-manager-api/go/crd/v1/workspace_types.go +++ b/components/ws-manager-api/go/crd/v1/workspace_types.go @@ -88,6 +88,8 @@ type GitSpec struct { } type TimeoutSpec struct { + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" Time *metav1.Duration `json:"time,omitempty"` } diff --git a/components/ws-manager-mk2/config/crd/bases/workspace.gitpod.io_workspaces.yaml b/components/ws-manager-mk2/config/crd/bases/workspace.gitpod.io_workspaces.yaml index 2fd8bf2bf6a37e..c35e4f68f24e44 100644 --- a/components/ws-manager-mk2/config/crd/bases/workspace.gitpod.io_workspaces.yaml +++ b/components/ws-manager-mk2/config/crd/bases/workspace.gitpod.io_workspaces.yaml @@ -262,6 +262,7 @@ spec: timeout: properties: time: + pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ type: string type: object type: