Skip to content

Commit

Permalink
feat: Restrict the total number of 'Running' workspaces on a cluster (#…
Browse files Browse the repository at this point in the history
…1888)

Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha authored Aug 21, 2024
1 parent 145a76e commit 5b644d5
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 2 deletions.
6 changes: 6 additions & 0 deletions api/v2/checluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ type CheClusterDevEnvironments struct {
// +kubebuilder:validation:Minimum:=-1
// +optional
MaxNumberOfRunningWorkspacesPerUser *int64 `json:"maxNumberOfRunningWorkspacesPerUser,omitempty"`
// The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
// This applies to all users in the system. If the value is set to -1, it means there is
// no limit on the number of running workspaces.
// +kubebuilder:validation:Minimum:=-1
// +optional
MaxNumberOfRunningWorkspacesPerCluster *int64 `json:"maxNumberOfRunningWorkspacesPerCluster,omitempty"`
// User configuration.
// +optional
User *UserConfiguration `json:"user,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/eclipse-che/che-operator
support: Eclipse Foundation
name: eclipse-che.v7.90.0-879.next
name: eclipse-che.v7.91.0-880.next
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1035,7 +1035,7 @@ spec:
minKubeVersion: 1.19.0
provider:
name: Eclipse Foundation
version: 7.90.0-879.next
version: 7.91.0-880.next
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7028,6 +7028,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/org.eclipse.che_checlusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6981,6 +6981,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down
8 changes: 8 additions & 0 deletions deploy/deployment/kubernetes/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7002,6 +7002,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6997,6 +6997,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down
8 changes: 8 additions & 0 deletions deploy/deployment/openshift/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7002,6 +7002,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6997,6 +6997,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6997,6 +6997,14 @@ spec:
- IfNotPresent
- Never
type: string
maxNumberOfRunningWorkspacesPerCluster:
description: |-
The maximum number of concurrently running workspaces across the entire Kubernetes cluster.
This applies to all users in the system. If the value is set to -1, it means there is
no limit on the number of running workspaces.
format: int64
minimum: -1
type: integer
maxNumberOfRunningWorkspacesPerUser:
description: |-
The maximum number of running workspaces per user.
Expand Down

0 comments on commit 5b644d5

Please sign in to comment.