poniedziałek, 5 listopada 2018

Setting quotas for users (tenants)

One of the first things you should do after you install Openshift cluster is to setup resource quotas in order to avoid creative users exhausting your cluster compute resources instantly. In Openshift you can leverage Cluster Resource Quota which allows you to create multi project quotas for example for different users (tenants). Here is how I'm typically doing that:

First create Cluster Resource Quota files. I typically create 3 seperate files for non-terminating compute resources, terminating compute resources and storage resources. When this files are in place execute following commands to create user (tenant) quota. From now on each project created by the user (tenant) will be covered by his quota.

Last two things you should do to get this working is to setup limit range object in each project your user (tenant) will create and create maximum duration for builds executed by your user (tenant).


Best way to setup limit range is to create default project template  which contains limit range object as described here.

In order to set maximum build duration please follow docs here.