1

I would like to update or change memory limit to 90Gi in this spec using command line.

spec: hard: limits.cpu: 12500m limits.memory: 80Gi pods: "10" requests.cpu: 12500m requests.memory: 80Gi

The current steps are oc edit quota compute-resources, manually change the limit and save.

Daein Park
  • 4,393
  • 2
  • 12
  • 21
Rajiv
  • 41
  • 1
  • 6

1 Answers1

4

Try the following commands for your purpose.

For specific quota modification.

$ oc delete quota <name> && oc create quota <name> \
     --hard=cpu=12500m,memory=80Gi

For specific deploymentconfig which you can list using oc get dc.

$ oc set resources dc/<target deploymentconfig name> \
   --limits=cpu=12500m,memory=80Gi \
   --requests=cpu=12500m,memory=80Gi
Daein Park
  • 4,393
  • 2
  • 12
  • 21
  • Thanks @Daein-park for the reply, can you help with the exact command. I am new to OSE and unable to find the target deployment config name. – Rajiv Jun 29 '20 at 11:25
  • @Rajiv I check your question again, and I recognized it's about quota, not specific deploymentconfig. I updated above my answer for the quota. – Daein Park Jun 29 '20 at 13:00
  • The ResourceQuota "compute-resources" is invalid: spec.scopes: Invalid value: []core.ResourceQuotaScope(nil): field is immutable [ – Rajiv Jun 29 '20 at 13:46
  • As far as I can see the message, in the Quota case, you should create Quota resource again after removing it. – Daein Park Jun 29 '20 at 14:00
  • If you can create Quota resource, you can also remove it either. Please reach out to your OCP administrator, because you may not have a permission enough to operate Quota resource. – Daein Park Jun 30 '20 at 01:06