{"action":"created","comment":{"url":"https://api.github.com/repos/kyma-project/kyma/pulls/comments/218097499","pull_request_review_id":155944778,"id":218097499,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODA5NzQ5OQ==","diff_hunk":"@@ -0,0 +1,116 @@\n+# ResourceQuotasStatus \n+\n+[ResourceQuota](https://kubernetes.io/docs/concepts/policy/resource-quotas/) provides constraints that limit aggregate resource consumption per Namespace.\n+\n+The ResourceQuota values can be as follows:\n+```bash\n+Name:            kyma-default\n+Resource         Used       Hard\n+--------         ---        ---\n+limits.memory    7348440Ki  10Gi\n+requests.memory  3727576Ki  7Gi\n+```\n+The `used` values of the ResourceQuota can exceed the `hard` values and block any resource creation in the Environment.\n+\n+The ResourceQuotasStatus contains the flag and list of exceeded ResourceQuotas limits, together with a set of resources which exceed that limits. The value of the flag informs you if any ResourceQuota is exceeded in any possible way.\n+\n+ResourceQuotasStatus should detect whenever any ReplicaSet or StatefulSet in your Environment cannot progress because it's blocked by the ResourceQuota.\n+To check that you must calculate the required amount of resources to create another replica. If there is not enough resources, you should return the exceeded status.\n+\n+[Here](https://github.com/dtaylor113/origin-web-console/blob/master/app/scripts/services/quota.js#L86) you can find the example implementation of the checking logic in UI.\n+\n+## The Console calls\n+\n+The Console calls for the ResourceQuotasStatus automatically. The calls are triggered after: \n+- switching the environment\n+- uploading a resource\n+- creating a lambda \n+- opening environment's details\n+\n+## Implementation\n+\n+This section contains the steps of the ResourceQuotaStatus implementation.\n+\n+### Calculate the available resources in the Environment\n+\n+To calculate amount of available resources in the given Environment you must list the ResourceQuotas and loop through them.\n+You can get the available amount of resources by calculating the difference from `.spec.hard` and `.status.used` in each ResourceQuota.\n+For each resource limit specified in the ResourceQuotas, you must calculate the available amount of resources using the ResourceQuota with the lowest `.spec.hard` value for that resource type.","path":"components/ui-api-layer/docs/resource-quotas-status.md","position":38,"original_position":38,"commit_id":"40abb74b7320f36b31e4cb45bcf7c4e60171c64e","original_commit_id":"40abb74b7320f36b31e4cb45bcf7c4e60171c64e","user":{"login":"klaudiagrz","id":35192450,"node_id":"MDQ6VXNlcjM1MTkyNDUw","avatar_url":"https://avatars2.githubusercontent.com/u/35192450?v=4","gravatar_id":"","url":"https://api.github.com/users/klaudiagrz","html_url":"https://github.com/klaudiagrz","followers_url":"https://api.github.com/users/klaudiagrz/followers","following_url":"https://api.github.com/users/klaudiagrz/following{/other_user}","gists_url":"https://api.github.com/users/klaudiagrz/gists{/gist_id}","starred_url":"https://api.github.com/users/klaudiagrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klaudiagrz/subscriptions","organizations_url":"https://api.github.com/users/klaudiagrz/orgs","repos_url":"https://api.github.com/users/klaudiagrz/repos","events_url":"https://api.github.com/users/klaudiagrz/events{/privacy}","received_events_url":"https://api.github.com/users/klaudiagrz/received_events","type":"User","site_admin":false},"body":"`the available number of`\r\n`**.spec.hard**`","created_at":"2018-09-17T14:44:09Z","updated_at":"2018-09-17T14:49:51Z","html_url":"https://github.com/kyma-project/kyma/pull/655#discussion_r218097499","pull_request_url":"https://api.github.com/repos/kyma-project/kyma/pulls/655","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/comments/218097499"},"html":{"href":"https://github.com/kyma-project/kyma/pull/655#discussion_r218097499"},"pull_request":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/655"}}},"pull_request":{"url":"https://api.github.com/repos/kyma-project/kyma/pulls/655","id":214977492,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0OTc3NDky","html_url":"https://github.com/kyma-project/kyma/pull/655","diff_url":"https://github.com/kyma-project/kyma/pull/655.diff","patch_url":"https://github.com/kyma-project/kyma/pull/655.patch","issue_url":"https://api.github.com/repos/kyma-project/kyma/issues/655","number":655,"state":"open","locked":false,"title":"Convert the ResourceQuotaStatus proposal into the proper documentation","user":{"login":"polskikiel","id":21159554,"node_id":"MDQ6VXNlcjIxMTU5NTU0","avatar_url":"https://avatars1.githubusercontent.com/u/21159554?v=4","gravatar_id":"","url":"https://api.github.com/users/polskikiel","html_url":"https://github.com/polskikiel","followers_url":"https://api.github.com/users/polskikiel/followers","following_url":"https://api.github.com/users/polskikiel/following{/other_user}","gists_url":"https://api.github.com/users/polskikiel/gists{/gist_id}","starred_url":"https://api.github.com/users/polskikiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polskikiel/subscriptions","organizations_url":"https://api.github.com/users/polskikiel/orgs","repos_url":"https://api.github.com/users/polskikiel/repos","events_url":"https://api.github.com/users/polskikiel/events{/privacy}","received_events_url":"https://api.github.com/users/polskikiel/received_events","type":"User","site_admin":false},"body":"<!--   Thank you for your contribution. Before you submit the pull request:\r\n1. Follow contributing guidelines, templates, the recommended Git workflow, and any related documentation.\r\n2. Read and submit the required Contributor Licence Agreements (https://github.com/kyma-project/community/blob/master/CONTRIBUTING.md#agreements-and-licenses).\r\n3. Test your changes and attach their results to the pull request.\r\n4. Update the relevant documentation.\r\n-->\r\n\r\n**Description**\r\n\r\nChanges proposed in this pull request:\r\n\r\n- Conversion of the ResourceQuotaStatus proposal to documentation.\r\n","created_at":"2018-09-12T14:14:35Z","updated_at":"2018-09-17T14:49:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4231f6de119e32770e6c039f4414dbfbfd581024","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dpolitesap","id":22739716,"node_id":"MDQ6VXNlcjIyNzM5NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/22739716?v=4","gravatar_id":"","url":"https://api.github.com/users/dpolitesap","html_url":"https://github.com/dpolitesap","followers_url":"https://api.github.com/users/dpolitesap/followers","following_url":"https://api.github.com/users/dpolitesap/following{/other_user}","gists_url":"https://api.github.com/users/dpolitesap/gists{/gist_id}","starred_url":"https://api.github.com/users/dpolitesap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpolitesap/subscriptions","organizations_url":"https://api.github.com/users/dpolitesap/orgs","repos_url":"https://api.github.com/users/dpolitesap/repos","events_url":"https://api.github.com/users/dpolitesap/events{/privacy}","received_events_url":"https://api.github.com/users/dpolitesap/received_events","type":"User","site_admin":false},{"login":"tomekpapiernik","id":29116492,"node_id":"MDQ6VXNlcjI5MTE2NDky","avatar_url":"https://avatars3.githubusercontent.com/u/29116492?v=4","gravatar_id":"","url":"https://api.github.com/users/tomekpapiernik","html_url":"https://github.com/tomekpapiernik","followers_url":"https://api.github.com/users/tomekpapiernik/followers","following_url":"https://api.github.com/users/tomekpapiernik/following{/other_user}","gists_url":"https://api.github.com/users/tomekpapiernik/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekpapiernik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekpapiernik/subscriptions","organizations_url":"https://api.github.com/users/tomekpapiernik/orgs","repos_url":"https://api.github.com/users/tomekpapiernik/repos","events_url":"https://api.github.com/users/tomekpapiernik/events{/privacy}","received_events_url":"https://api.github.com/users/tomekpapiernik/received_events","type":"User","site_admin":false},{"login":"kazydek","id":40655785,"node_id":"MDQ6VXNlcjQwNjU1Nzg1","avatar_url":"https://avatars0.githubusercontent.com/u/40655785?v=4","gravatar_id":"","url":"https://api.github.com/users/kazydek","html_url":"https://github.com/kazydek","followers_url":"https://api.github.com/users/kazydek/followers","following_url":"https://api.github.com/users/kazydek/following{/other_user}","gists_url":"https://api.github.com/users/kazydek/gists{/gist_id}","starred_url":"https://api.github.com/users/kazydek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazydek/subscriptions","organizations_url":"https://api.github.com/users/kazydek/orgs","repos_url":"https://api.github.com/users/kazydek/repos","events_url":"https://api.github.com/users/kazydek/events{/privacy}","received_events_url":"https://api.github.com/users/kazydek/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1032299964,"node_id":"MDU6TGFiZWwxMDMyMjk5OTY0","url":"https://api.github.com/repos/kyma-project/kyma/labels/area/documentation","name":"area/documentation","color":"3cba12","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kyma-project/kyma/pulls/655/commits","review_comments_url":"https://api.github.com/repos/kyma-project/kyma/pulls/655/comments","review_comment_url":"https://api.github.com/repos/kyma-project/kyma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kyma-project/kyma/issues/655/comments","statuses_url":"https://api.github.com/repos/kyma-project/kyma/statuses/40abb74b7320f36b31e4cb45bcf7c4e60171c64e","head":{"label":"polskikiel:doc-rq-exceed","ref":"doc-rq-exceed","sha":"40abb74b7320f36b31e4cb45bcf7c4e60171c64e","user":{"login":"polskikiel","id":21159554,"node_id":"MDQ6VXNlcjIxMTU5NTU0","avatar_url":"https://avatars1.githubusercontent.com/u/21159554?v=4","gravatar_id":"","url":"https://api.github.com/users/polskikiel","html_url":"https://github.com/polskikiel","followers_url":"https://api.github.com/users/polskikiel/followers","following_url":"https://api.github.com/users/polskikiel/following{/other_user}","gists_url":"https://api.github.com/users/polskikiel/gists{/gist_id}","starred_url":"https://api.github.com/users/polskikiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polskikiel/subscriptions","organizations_url":"https://api.github.com/users/polskikiel/orgs","repos_url":"https://api.github.com/users/polskikiel/repos","events_url":"https://api.github.com/users/polskikiel/events{/privacy}","received_events_url":"https://api.github.com/users/polskikiel/received_events","type":"User","site_admin":false},"repo":{"id":142268416,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIyNjg0MTY=","name":"kyma","full_name":"polskikiel/kyma","private":false,"owner":{"login":"polskikiel","id":21159554,"node_id":"MDQ6VXNlcjIxMTU5NTU0","avatar_url":"https://avatars1.githubusercontent.com/u/21159554?v=4","gravatar_id":"","url":"https://api.github.com/users/polskikiel","html_url":"https://github.com/polskikiel","followers_url":"https://api.github.com/users/polskikiel/followers","following_url":"https://api.github.com/users/polskikiel/following{/other_user}","gists_url":"https://api.github.com/users/polskikiel/gists{/gist_id}","starred_url":"https://api.github.com/users/polskikiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polskikiel/subscriptions","organizations_url":"https://api.github.com/users/polskikiel/orgs","repos_url":"https://api.github.com/users/polskikiel/repos","events_url":"https://api.github.com/users/polskikiel/events{/privacy}","received_events_url":"https://api.github.com/users/polskikiel/received_events","type":"User","site_admin":false},"html_url":"https://github.com/polskikiel/kyma","description":"A flexible and easy way to connect and extend enterprise applications in a cloud-native world","fork":true,"url":"https://api.github.com/repos/polskikiel/kyma","forks_url":"https://api.github.com/repos/polskikiel/kyma/forks","keys_url":"https://api.github.com/repos/polskikiel/kyma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polskikiel/kyma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polskikiel/kyma/teams","hooks_url":"https://api.github.com/repos/polskikiel/kyma/hooks","issue_events_url":"https://api.github.com/repos/polskikiel/kyma/issues/events{/number}","events_url":"https://api.github.com/repos/polskikiel/kyma/events","assignees_url":"https://api.github.com/repos/polskikiel/kyma/assignees{/user}","branches_url":"https://api.github.com/repos/polskikiel/kyma/branches{/branch}","tags_url":"https://api.github.com/repos/polskikiel/kyma/tags","blobs_url":"https://api.github.com/repos/polskikiel/kyma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polskikiel/kyma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polskikiel/kyma/git/refs{/sha}","trees_url":"https://api.github.com/repos/polskikiel/kyma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polskikiel/kyma/statuses/{sha}","languages_url":"https://api.github.com/repos/polskikiel/kyma/languages","stargazers_url":"https://api.github.com/repos/polskikiel/kyma/stargazers","contributors_url":"https://api.github.com/repos/polskikiel/kyma/contributors","subscribers_url":"https://api.github.com/repos/polskikiel/kyma/subscribers","subscription_url":"https://api.github.com/repos/polskikiel/kyma/subscription","commits_url":"https://api.github.com/repos/polskikiel/kyma/commits{/sha}","git_commits_url":"https://api.github.com/repos/polskikiel/kyma/git/commits{/sha}","comments_url":"https://api.github.com/repos/polskikiel/kyma/comments{/number}","issue_comment_url":"https://api.github.com/repos/polskikiel/kyma/issues/comments{/number}","contents_url":"https://api.github.com/repos/polskikiel/kyma/contents/{+path}","compare_url":"https://api.github.com/repos/polskikiel/kyma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polskikiel/kyma/merges","archive_url":"https://api.github.com/repos/polskikiel/kyma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polskikiel/kyma/downloads","issues_url":"https://api.github.com/repos/polskikiel/kyma/issues{/number}","pulls_url":"https://api.github.com/repos/polskikiel/kyma/pulls{/number}","milestones_url":"https://api.github.com/repos/polskikiel/kyma/milestones{/number}","notifications_url":"https://api.github.com/repos/polskikiel/kyma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polskikiel/kyma/labels{/name}","releases_url":"https://api.github.com/repos/polskikiel/kyma/releases{/id}","deployments_url":"https://api.github.com/repos/polskikiel/kyma/deployments","created_at":"2018-07-25T08:07:29Z","updated_at":"2018-09-17T14:14:43Z","pushed_at":"2018-09-17T14:14:40Z","git_url":"git://github.com/polskikiel/kyma.git","ssh_url":"git@github.com:polskikiel/kyma.git","clone_url":"https://github.com/polskikiel/kyma.git","svn_url":"https://github.com/polskikiel/kyma","homepage":"","size":5206,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kyma-project:master","ref":"master","sha":"9a907f582fce5b1cdf382a796d076eb382cb4ccb","user":{"login":"kyma-project","id":39153523,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTUzNTIz","avatar_url":"https://avatars3.githubusercontent.com/u/39153523?v=4","gravatar_id":"","url":"https://api.github.com/users/kyma-project","html_url":"https://github.com/kyma-project","followers_url":"https://api.github.com/users/kyma-project/followers","following_url":"https://api.github.com/users/kyma-project/following{/other_user}","gists_url":"https://api.github.com/users/kyma-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kyma-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyma-project/subscriptions","organizations_url":"https://api.github.com/users/kyma-project/orgs","repos_url":"https://api.github.com/users/kyma-project/repos","events_url":"https://api.github.com/users/kyma-project/events{/privacy}","received_events_url":"https://api.github.com/users/kyma-project/received_events","type":"Organization","site_admin":false},"repo":{"id":139590616,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk1OTA2MTY=","name":"kyma","full_name":"kyma-project/kyma","private":false,"owner":{"login":"kyma-project","id":39153523,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTUzNTIz","avatar_url":"https://avatars3.githubusercontent.com/u/39153523?v=4","gravatar_id":"","url":"https://api.github.com/users/kyma-project","html_url":"https://github.com/kyma-project","followers_url":"https://api.github.com/users/kyma-project/followers","following_url":"https://api.github.com/users/kyma-project/following{/other_user}","gists_url":"https://api.github.com/users/kyma-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kyma-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyma-project/subscriptions","organizations_url":"https://api.github.com/users/kyma-project/orgs","repos_url":"https://api.github.com/users/kyma-project/repos","events_url":"https://api.github.com/users/kyma-project/events{/privacy}","received_events_url":"https://api.github.com/users/kyma-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kyma-project/kyma","description":"A flexible and easy way to connect and extend enterprise applications in a cloud-native world","fork":false,"url":"https://api.github.com/repos/kyma-project/kyma","forks_url":"https://api.github.com/repos/kyma-project/kyma/forks","keys_url":"https://api.github.com/repos/kyma-project/kyma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyma-project/kyma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyma-project/kyma/teams","hooks_url":"https://api.github.com/repos/kyma-project/kyma/hooks","issue_events_url":"https://api.github.com/repos/kyma-project/kyma/issues/events{/number}","events_url":"https://api.github.com/repos/kyma-project/kyma/events","assignees_url":"https://api.github.com/repos/kyma-project/kyma/assignees{/user}","branches_url":"https://api.github.com/repos/kyma-project/kyma/branches{/branch}","tags_url":"https://api.github.com/repos/kyma-project/kyma/tags","blobs_url":"https://api.github.com/repos/kyma-project/kyma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyma-project/kyma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyma-project/kyma/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyma-project/kyma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyma-project/kyma/statuses/{sha}","languages_url":"https://api.github.com/repos/kyma-project/kyma/languages","stargazers_url":"https://api.github.com/repos/kyma-project/kyma/stargazers","contributors_url":"https://api.github.com/repos/kyma-project/kyma/contributors","subscribers_url":"https://api.github.com/repos/kyma-project/kyma/subscribers","subscription_url":"https://api.github.com/repos/kyma-project/kyma/subscription","commits_url":"https://api.github.com/repos/kyma-project/kyma/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyma-project/kyma/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyma-project/kyma/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyma-project/kyma/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyma-project/kyma/contents/{+path}","compare_url":"https://api.github.com/repos/kyma-project/kyma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyma-project/kyma/merges","archive_url":"https://api.github.com/repos/kyma-project/kyma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyma-project/kyma/downloads","issues_url":"https://api.github.com/repos/kyma-project/kyma/issues{/number}","pulls_url":"https://api.github.com/repos/kyma-project/kyma/pulls{/number}","milestones_url":"https://api.github.com/repos/kyma-project/kyma/milestones{/number}","notifications_url":"https://api.github.com/repos/kyma-project/kyma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyma-project/kyma/labels{/name}","releases_url":"https://api.github.com/repos/kyma-project/kyma/releases{/id}","deployments_url":"https://api.github.com/repos/kyma-project/kyma/deployments","created_at":"2018-07-03T13:51:34Z","updated_at":"2018-09-17T14:14:25Z","pushed_at":"2018-09-17T14:43:12Z","git_url":"git://github.com/kyma-project/kyma.git","ssh_url":"git@github.com:kyma-project/kyma.git","clone_url":"https://github.com/kyma-project/kyma.git","svn_url":"https://github.com/kyma-project/kyma","homepage":"","size":5199,"stargazers_count":412,"watchers_count":412,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":88,"mirror_url":null,"archived":false,"open_issues_count":235,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":88,"open_issues":235,"watchers":412,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/655"},"html":{"href":"https://github.com/kyma-project/kyma/pull/655"},"issue":{"href":"https://api.github.com/repos/kyma-project/kyma/issues/655"},"comments":{"href":"https://api.github.com/repos/kyma-project/kyma/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/kyma-project/kyma/statuses/40abb74b7320f36b31e4cb45bcf7c4e60171c64e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"klaudiagrz"}}