Bug 1806722

Summary: specDescriptor - "resourceRequirements" - Missing 'Limits/Requests' fields for "Storage (ephemeral storage)" resource [openshift-4.4]
Product: OpenShift Container Platform Reporter: bpeterse
Component: Management ConsoleAssignee: Cyril <cajieh>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, bpeterse, cajieh, jokerman, spadgett, tony.wu, yanpzhan, yapei
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Feature: Add 'Limits/Requests' fields for "Storage (ephemeral storage)" resource Reason: Result: Works as expected
Story Points: ---
Clone Of: 1794844 Environment:
Last Closed: 2020-05-04 11:39:25 UTC Type: ---
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: 1794844    
Bug Blocks:    

Description bpeterse 2020-02-24 20:32:25 UTC
+++ This bug was initially created as a clone of Bug #1794844 +++

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:

--- Additional comment from  on 2020-01-24 20:58:44 UTC ---

Ported from JIRA bug:
https://issues.redhat.com/browse/CONSOLE-1922

--- Additional comment from  on 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

--- Additional comment from  on 2020-01-27 21:18:16 UTC ---

See additional info (e.g. proposed mockups in JIRA from the previous comment).

--- Additional comment from Samuel Padgett on 2020-02-03 17:03:19 UTC ---

See also https://github.com/openshift/console/issues/4139

Comment 3 Yanping Zhang 2020-03-09 08:04:25 UTC
Checked on 4.4 cluster with payload "4.4.0-0.nightly-2020-03-08-180026"
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 5 errata-xmlrpc 2020-05-04 11:39:25 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:0581