diff --git a/apis/controller/v1alpha1/zz_generated.deepcopy.go b/apis/controller/v1alpha1/zz_generated.deepcopy.go index 648e81080..b6ea2c79d 100644 --- a/apis/controller/v1alpha1/zz_generated.deepcopy.go +++ b/apis/controller/v1alpha1/zz_generated.deepcopy.go @@ -477,6 +477,31 @@ func (in *RoutingConfig) DeepCopy() *RoutingConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageSizes) DeepCopyInto(out *StorageSizes) { + *out = *in + if in.Common != nil { + in, out := &in.Common, &out.Common + x := (*in).DeepCopy() + *out = &x + } + if in.PerWorkspace != nil { + in, out := &in.PerWorkspace, &out.PerWorkspace + x := (*in).DeepCopy() + *out = &x + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSizes. +func (in *StorageSizes) DeepCopy() *StorageSizes { + if in == nil { + return nil + } + out := new(StorageSizes) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WorkspaceConfig) DeepCopyInto(out *WorkspaceConfig) { *out = *in @@ -485,6 +510,11 @@ func (in *WorkspaceConfig) DeepCopyInto(out *WorkspaceConfig) { *out = new(string) **out = **in } + if in.DefaultStorageSize != nil { + in, out := &in.DefaultStorageSize, &out.DefaultStorageSize + *out = new(StorageSizes) + (*in).DeepCopyInto(*out) + } if in.IgnoredUnrecoverableEvents != nil { in, out := &in.IgnoredUnrecoverableEvents, &out.IgnoredUnrecoverableEvents *out = make([]string, len(*in)) diff --git a/deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml b/deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml index 49432e524..ec0bac0a6 100644 --- a/deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml +++ b/deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml @@ -62,6 +62,24 @@ spec: cleanupOnStop: description: CleanupOnStop governs how the Operator handles stopped DevWorkspaces. If set to true, additional resources associated with a DevWorkspace (e.g. services, deployments, configmaps, etc.) will be removed from the cluster when a DevWorkspace has .spec.started = false. If set to false, resources will be scaled down (e.g. deployments but the objects will be left on the cluster). The default value is false. type: boolean + defaultStorageSize: + description: DefaultStorageSize defines an optional struct with fields to specify the sizes of Persistent Volume Claims for storage classes used by DevWorkspaces. + properties: + common: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for the "common" storage class. Note that the "async" storage class also uses the PVC size set for the "common" storage class. If not specified, the "common" and "async" Persistent Volume Claim sizes are set to 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + perWorkspace: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for the "per-workspace" storage class. If not specified, the "per-workspace" Persistent Volume Claim size is set to 5Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object idleTimeout: description: IdleTimeout determines how long a workspace should sit idle before being automatically scaled down. Proper functionality of this configuration property requires support in the workspace being started. If not specified, the default value of "15m" is used. type: string @@ -171,7 +189,7 @@ spec: pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string storageClassName: - description: StorageClassName defines and optional storageClass to use for persistent volume claims created to support DevWorkspaces + description: StorageClassName defines an optional storageClass to use for persistent volume claims created to support DevWorkspaces type: string type: object type: object diff --git a/deploy/deployment/kubernetes/combined.yaml b/deploy/deployment/kubernetes/combined.yaml index ac3cca4a1..5d96e4d41 100644 --- a/deploy/deployment/kubernetes/combined.yaml +++ b/deploy/deployment/kubernetes/combined.yaml @@ -97,6 +97,32 @@ spec: down (e.g. deployments but the objects will be left on the cluster). The default value is false. type: boolean + defaultStorageSize: + description: DefaultStorageSize defines an optional struct with + fields to specify the sizes of Persistent Volume Claims for + storage classes used by DevWorkspaces. + properties: + common: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "common" storage class. Note that the "async" storage + class also uses the PVC size set for the "common" storage + class. If not specified, the "common" and "async" Persistent + Volume Claim sizes are set to 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + perWorkspace: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "per-workspace" storage class. If not specified, the + "per-workspace" Persistent Volume Claim size is set to 5Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object idleTimeout: description: IdleTimeout determines how long a workspace should sit idle before being automatically scaled down. Proper functionality @@ -296,7 +322,7 @@ spec: pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string storageClassName: - description: StorageClassName defines and optional storageClass + description: StorageClassName defines an optional storageClass to use for persistent volume claims created to support DevWorkspaces type: string type: object diff --git a/deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml b/deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml index c28cc7f31..589e2a665 100644 --- a/deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml @@ -97,6 +97,32 @@ spec: down (e.g. deployments but the objects will be left on the cluster). The default value is false. type: boolean + defaultStorageSize: + description: DefaultStorageSize defines an optional struct with + fields to specify the sizes of Persistent Volume Claims for + storage classes used by DevWorkspaces. + properties: + common: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "common" storage class. Note that the "async" storage + class also uses the PVC size set for the "common" storage + class. If not specified, the "common" and "async" Persistent + Volume Claim sizes are set to 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + perWorkspace: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "per-workspace" storage class. If not specified, the + "per-workspace" Persistent Volume Claim size is set to 5Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object idleTimeout: description: IdleTimeout determines how long a workspace should sit idle before being automatically scaled down. Proper functionality @@ -296,7 +322,7 @@ spec: pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string storageClassName: - description: StorageClassName defines and optional storageClass + description: StorageClassName defines an optional storageClass to use for persistent volume claims created to support DevWorkspaces type: string type: object diff --git a/deploy/deployment/openshift/combined.yaml b/deploy/deployment/openshift/combined.yaml index 5e2033bfb..c98494084 100644 --- a/deploy/deployment/openshift/combined.yaml +++ b/deploy/deployment/openshift/combined.yaml @@ -97,6 +97,32 @@ spec: down (e.g. deployments but the objects will be left on the cluster). The default value is false. type: boolean + defaultStorageSize: + description: DefaultStorageSize defines an optional struct with + fields to specify the sizes of Persistent Volume Claims for + storage classes used by DevWorkspaces. + properties: + common: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "common" storage class. Note that the "async" storage + class also uses the PVC size set for the "common" storage + class. If not specified, the "common" and "async" Persistent + Volume Claim sizes are set to 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + perWorkspace: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "per-workspace" storage class. If not specified, the + "per-workspace" Persistent Volume Claim size is set to 5Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object idleTimeout: description: IdleTimeout determines how long a workspace should sit idle before being automatically scaled down. Proper functionality @@ -296,7 +322,7 @@ spec: pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string storageClassName: - description: StorageClassName defines and optional storageClass + description: StorageClassName defines an optional storageClass to use for persistent volume claims created to support DevWorkspaces type: string type: object diff --git a/deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml b/deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml index c28cc7f31..589e2a665 100644 --- a/deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml @@ -97,6 +97,32 @@ spec: down (e.g. deployments but the objects will be left on the cluster). The default value is false. type: boolean + defaultStorageSize: + description: DefaultStorageSize defines an optional struct with + fields to specify the sizes of Persistent Volume Claims for + storage classes used by DevWorkspaces. + properties: + common: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "common" storage class. Note that the "async" storage + class also uses the PVC size set for the "common" storage + class. If not specified, the "common" and "async" Persistent + Volume Claim sizes are set to 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + perWorkspace: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "per-workspace" storage class. If not specified, the + "per-workspace" Persistent Volume Claim size is set to 5Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object idleTimeout: description: IdleTimeout determines how long a workspace should sit idle before being automatically scaled down. Proper functionality @@ -296,7 +322,7 @@ spec: pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string storageClassName: - description: StorageClassName defines and optional storageClass + description: StorageClassName defines an optional storageClass to use for persistent volume claims created to support DevWorkspaces type: string type: object diff --git a/deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml b/deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml index 2eb7c70a9..e642539cc 100644 --- a/deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml +++ b/deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml @@ -96,6 +96,32 @@ spec: down (e.g. deployments but the objects will be left on the cluster). The default value is false. type: boolean + defaultStorageSize: + description: DefaultStorageSize defines an optional struct with + fields to specify the sizes of Persistent Volume Claims for + storage classes used by DevWorkspaces. + properties: + common: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "common" storage class. Note that the "async" storage + class also uses the PVC size set for the "common" storage + class. If not specified, the "common" and "async" Persistent + Volume Claim sizes are set to 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + perWorkspace: + anyOf: + - type: integer + - type: string + description: The default Persistent Volume Claim size for + the "per-workspace" storage class. If not specified, the + "per-workspace" Persistent Volume Claim size is set to 5Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object idleTimeout: description: IdleTimeout determines how long a workspace should sit idle before being automatically scaled down. Proper functionality @@ -295,7 +321,7 @@ spec: pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string storageClassName: - description: StorageClassName defines and optional storageClass + description: StorageClassName defines an optional storageClass to use for persistent volume claims created to support DevWorkspaces type: string type: object