docs/proposals/capabilities.md
A capability is something that a user interface may change its behavior based on.
In v2 of OpenShift we tracked:
In v3 of OpenShift we may have:
Capabilities triggered from global configuration will consist of two types:
Features that are turned on/off globally will result in changes to policy objects. There will be an API for requesting the effective policy for a set of actions for a given user.
Global resource constraints will change the effective resource constraints for a project if the global constraints are more restrictive.
Capabilities for the project will consist of two main types:
Resource constraints for the project will be stored on the “ResourceController” associated with the namespace. The ResourceController is the same object used by the admission control system, both to check allowed usage and to store actual usage.
Features that are turned on/off for a project are persisted as changes to policy objects. There will be an API for requesting the effective policy for a set of actions for a given user.
Account is a separate entity from user, many users might be associated with a single account, and users will have a role on the account.
Once we have accounts, they will have a ResourceController associated with them.
Policy should never check capabilities on a project or account. If something needs to be checked against the capabilities on the project or account then the check should be in admission control.
Both policy and admission control will check globally configured capabilities.
Global configuration for blacklists / whitelists (blacklisting namespaces / container image registries / etc) will not be considered capabilities and will not be surfaced through the API. It will be the job of the admission controller to check these configurations and throw reasonable errors when something is rejected due to blacklisting/whitelisting.
To retrieve a project's (or account's) effective resource constraints and current usage, you will GET the ResourceController for the project (account). The effective resource constraint for a given resource type is either the global resource constraint or the project's resource constraint, whichever is more restrictive.
When getting a ResourceController the relevant subobjects are: