Bug 1794844

Summary: specDescriptor - "resourceRequirements" - Missing 'Limits/Requests' fields for "Storage (ephemeral storage)" resource
Product: OpenShift Container Platform Reporter: tony.wu
Component: Management ConsoleAssignee: Cyril <cajieh>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, cajieh, jokerman, spadgett, yanpzhan
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Missing requirement Consequence: Fix: Yes Result: Works as expected
Story Points: ---
Clone Of:
: 1806722 (view as bug list) Environment:
Last Closed: 2020-07-13 17:13:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1806722    
Attachments:
Description Flags
resourceRequirement widget screenshot none

Description tony.wu 2020-01-24 20:57:48 UTC
Created attachment 1655146 [details]
resourceRequirement widget screenshot

Description of problem:

Currently, the "resourceRequirements" specDescriptor only supports specifying 'Limits/Requests' fields for "CPU" and "Memory" resources.

https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md#resourcerequirements

Need to support specifying 'Limits/Requests' fields for "Storage" resource too.
e.g.
1. Couchbase Operator - CRD: CouchbaseCluster
2. StorageOS Operator - CRD: NFSServer


Version-Release number of selected component (if applicable):
OCP Console 4.2 and up


How reproducible:
Always


Steps to Reproduce:
1. Installed "Couchbase Operator" from 'OperatorHub' view
2. Go to 'Installed Operators' view and find "Couchbase Operator"
3. Click "Create instance" link for "Couchbase Cluster"
4. Click "Edit form" link
5. Find "Resource Requirements" widget

Actual results:
Exposes "CPU CORES", "MEMORY" fields

Expected results:
Exposes "CPU CORES", "MEMORY", "STORAGE" fields


Additional info:

Comment 1 tony.wu 2020-01-24 20:58:44 UTC
Ported from JIRA bug:
https://issues.redhat.com/browse/CONSOLE-1922

Comment 2 tony.wu 2020-01-27 20:05:50 UTC
Per k8s doc, these "storage" related fields for node allocation are `limits.ephemeral-storage` and `requests.ephemeral-storage`. 
See below links for reference:
1. https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#requests-and-limits-setting-for-local-ephemeral-storage
2. https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#example-scenario
3. https://github.com/operator-framework/community-operators/blob/master/community-operators/kogito-operator/0.7.0/app.kiegroup.org_kogitojobsservices_crd.yaml#L94-L98

Here are a couple Operators that supports specifying a resource of the container:
1. Couchbase Operator - CRD: CouchbaseCluster
2. Kogito Operator - CRD: KogitoJobsService
3. Appsody Operator - CRD: Appsody Application

Comment 3 tony.wu 2020-01-27 21:18:16 UTC
See additional info (e.g. proposed mockups in JIRA from the previous comment).

Comment 4 Samuel Padgett 2020-02-03 17:03:19 UTC
See also https://github.com/openshift/console/issues/4139

Comment 5 bpeterse 2020-03-05 01:01:21 UTC
PR merged:
https://github.com/openshift/console/pull/4191

But this bug did not update.

Comment 6 Yanping Zhang 2020-03-09 08:22:29 UTC
Checked on OCP 4.5 cluster with payload: 4.5.0-0.nightly-2020-03-06-190457
1. Install Kogito Operator in project.
2. Click "Create instance" link for "KogitoJobsService".
3. Click "Edit form" link
4. Find "Resource Requirements" widget, there is "CPU CORES", "MEMORY", "STORAGE" fields, set values for them, click "Create".
5. Check on the kogito job service instance detail page, there is resource part containing cpu, memory, storage values.
The bug is fixed, so move it to Verified.

Comment 9 errata-xmlrpc 2020-07-13 17:13:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409