Bug 1746009

Summary: Limit number of self-provisioned projects per user via CR
Product: OpenShift Container Platform Reporter: Matous Jobanek <mjobanek>
Component: openshift-apiserverAssignee: Marc Curry <mcurry>
Status: CLOSED DEFERRED QA Contact: Xingxing Xia <xxia>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: alkazako, aos-bugs, dahernan, gblomqui, mfojtik, sttts
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rfe
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-29 13:10:56 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:

Description Matous Jobanek 2019-08-27 12:56:58 UTC
Description of problem:
In OpenShift 3, there was a possibility to limit number of self-provisioned projects per user via configuration in master-config.yaml file. In OpenShift 4, there is no way to create one or more level of limits and assign the limits via labels (in the same way as was done in OS 3).
Could you please add the support to OS 4 in a way that would be configurable via CR?

Version-Release number of selected component (if applicable):
4.x

Actual results:
There is no way to limit number of self-provisioned projects per user

Expected results:
There is a CR that takes a list of limits associated with labels - for example:

spec:
  limits:
    - limit: 0
    - selector: basic
      limit: 1
    - selector: advanced
      limit: 5
    - selector: admin

The limit contains two parameters: selector and limit. Selector specifies a label that should be used for applying the limit and the limit parameter sets a number of max self-provisioned namespaces. If the selector param is missing, then the limit is used as the default one for all users. If the limit param is missing, then the users with the label should be able to have an unlimited number of self-provisioned namespaces.


Additional info:
OpenShift 3 way: https://docs.openshift.com/container-platform/3.11/admin_guide/managing_projects.html#limit-projects-per-user