{"action":"created","comment":{"url":"https://api.github.com/repos/kyma-project/kyma/pulls/comments/212621763","pull_request_review_id":149295350,"id":212621763,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjYyMTc2Mw==","diff_hunk":"@@ -0,0 +1,84 @@\n+# Check when the ResourceQuota is exceeded\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+\n+```bash\n+Name:            kyma-default\n+Resource         Used       Hard\n+--------         ---        ---\n+limits.memory    7348440Ki  10Gi\n+requests.memory  3727576Ki  7Gi\n+```\n+\n+The Console calls for the ResourceQuota status. The calls are triggered after: \n+- switching the environment\n+- uploading a resource\n+- creating a lambda\n+- opening environment's details\n+ \n+The idea is to create an endpoint which returns the ResourceQuotaStatus.\n+The ResourceQuotaStatus contains the flag and the optional message. The value of this flag informs you if the ResourceQuota is exceeded.\n+\n+## Multistage check\n+\n+To check if you exceeded the ResourceQuota in the Environment, you must implement a few steps.\n+\n+### Check the status of the ResourceQuotas\n+\n+List ResourceQuotas in the given Namespace and loop through them. You exceeded the ResourceQuota if at least one of the  `.status.used` values equals or is bigger than its equivalent from the `.spec.hard` value.\n+In this situation, return the ResourceQuotaStatus with a flag set to `true`.\n+\n+You must specify which resources you want to check.\n+For Environments, check the following resources:\n+- memory requests and limits\n+- CPU requests and limits\n+- number of Pods\n+\n+### Check the ReplicaSets\n+\n+List ReplicaSets in the given Namespace and loop through them. You must check every ReplicaSet which number of desired replicas is not reached.\n+First of all, check if the ReplicaSet has an **OwnerReference** to the Deployment. If yes, you must get the Deployment's field `.spec.strategy.rollingUpdate.maxUnavailable` value.","path":"components/ui-api-layer/docs/proposals/exceed-resource-quota.md","position":null,"original_position":42,"commit_id":"266f2891242224ead91bc299bfed3acab0a5854f","original_commit_id":"3a89425d693d37c139455db460849fc409fa44bf","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":"Done","created_at":"2018-08-24T13:07:10Z","updated_at":"2018-08-24T13:11:23Z","html_url":"https://github.com/kyma-project/kyma/pull/207#discussion_r212621763","pull_request_url":"https://api.github.com/repos/kyma-project/kyma/pulls/207","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/comments/212621763"},"html":{"href":"https://github.com/kyma-project/kyma/pull/207#discussion_r212621763"},"pull_request":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/207"}},"in_reply_to_id":212618512},"pull_request":{"url":"https://api.github.com/repos/kyma-project/kyma/pulls/207","id":208832855,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4ODMyODU1","html_url":"https://github.com/kyma-project/kyma/pull/207","diff_url":"https://github.com/kyma-project/kyma/pull/207.diff","patch_url":"https://github.com/kyma-project/kyma/pull/207.patch","issue_url":"https://api.github.com/repos/kyma-project/kyma/issues/207","number":207,"state":"open","locked":false,"title":"Create a proposal about checking resource quotas","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":"Confirm these statements before you submit your pull request:\r\n\r\n- [x] I have read and submitted the required [Contributor Licence Agreements](https://github.com/kyma-project/community/blob/master/CONTRIBUTING.md#agreements-and-licenses).\r\n- [x] This pull request follows the contributing guidelines, recommended Git workflow, and templates.\r\n- [x] I have tested my changes.\r\n- [x] I have updated the relevant documentation.\r\n---\r\n\r\nChanges proposed in this pull request:\r\n\r\n- Created a proposal about checking if resource quotas limits have been exceeded\r\n","created_at":"2018-08-16T11:50:00Z","updated_at":"2018-08-24T13:11:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64467a64a2d701d5c3aa887194703290322a7e29","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":[],"milestone":null,"commits_url":"https://api.github.com/repos/kyma-project/kyma/pulls/207/commits","review_comments_url":"https://api.github.com/repos/kyma-project/kyma/pulls/207/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/207/comments","statuses_url":"https://api.github.com/repos/kyma-project/kyma/statuses/266f2891242224ead91bc299bfed3acab0a5854f","head":{"label":"polskikiel:enable-rq-api","ref":"enable-rq-api","sha":"266f2891242224ead91bc299bfed3acab0a5854f","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","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},"private":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-08-24T12:09:46Z","pushed_at":"2018-08-24T13:10:47Z","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":3909,"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":"26e3a6ffe1a3b093559b243b6ce8a444b9353c4d","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","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},"private":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-08-24T12:08:10Z","pushed_at":"2018-08-24T13:10:50Z","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":3881,"stargazers_count":386,"watchers_count":386,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":77,"mirror_url":null,"archived":false,"open_issues_count":37,"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":77,"open_issues":37,"watchers":386,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/207"},"html":{"href":"https://github.com/kyma-project/kyma/pull/207"},"issue":{"href":"https://api.github.com/repos/kyma-project/kyma/issues/207"},"comments":{"href":"https://api.github.com/repos/kyma-project/kyma/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/kyma-project/kyma/pulls/207/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/207/commits"},"statuses":{"href":"https://api.github.com/repos/kyma-project/kyma/statuses/266f2891242224ead91bc299bfed3acab0a5854f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"polskikiel"}}