-
Bug
-
Resolution: Unresolved
-
Major
-
3.11.0.GA
-
False
-
None
-
False
-
-
Description of problem:
This is my customers issue:
I want to control the quota for devspaces user at global level, as of now there is no quota set for a user.
How I can set a quota at global level so that a particular user should not consume all the system resources by defining resources in devfile.
Note: Quota should be at user namespace level controlled by cluster-admin, not at cluster level because it will not solving my purpose.
Please can you review the reproducer below, and advise on the best way to implement CPU and memory controls in workspaces?
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Provision ROSA cluster
- Install devspaces
- create a cheserver
- Apply the following RQ to the devspaces workspace namespace:
$ cat resource-quota.yaml apiVersion: v1 kind: ResourceQuota metadata: name: andbartl-quota spec: hard: limits.cpu: "4" limits.memory: 5Gi persistentvolumeclaims: "4" requests.cpu: 3900m requests.memory: 4800Mi requests.storage: 30Gi $ oc create -f resource-quota.yaml -n cluster-admin-devspaces
Now try and add an empty workspace and the following error occurs:
Failed to open the workspace
Error creating DevWorkspace deployment: Detected unrecoverable deployment condition: FailedCreate pods "workspace78e4bff00eea46fb-78db984f76-mkvcn" is forbidden: failed quota: andbartl-quota: must specify limits.cpu for: che-gateway,universal-developer-image; requests.cpu for: universal-developer-image
If I try the same workspace creation with a devfile:
schemaVersion: 2.1.0 metadata: name: multi-container-test components: - name: tools container: image: registry.redhat.io/devspaces/udi-rhel8@sha256:b0dfd9e15d878785bea5cb33a82a014abbd08c839917e72a8cd629c84bf47f1e cpuLimit: 750m cpuRequest: 450m memoryLimit: 512M memoryRequest: 256M - name: dixital container: image: registry.redhat.io/devspaces/udi-rhel8@sha256:b0dfd9e15d878785bea5cb33a82a014abbd08c839917e72a8cd629c84bf47f1e cpuLimit: 750m cpuRequest: 450m memoryLimit: 512M memoryRequest: 256M
and create using my github, I get the following error:
Failed to open the workspace
Error creating DevWorkspace deployment: Detected unrecoverable deployment condition: FailedCreate pods "workspace6b8d5750d44348ce-547969cd78-7dndf" is forbidden: failed quota: andbartl-quota: must specify limits.cpu for: che-gateway
Actual results:
Expected results:
Reproducibility (Always/Intermittent/Only Once):
Acceptance criteria:
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):