{"action":"opened","number":190,"pull_request":{"url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/190","id":280050931,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgwMDUwOTMx","html_url":"https://github.com/Azure/application-gateway-kubernetes-ingress/pull/190","diff_url":"https://github.com/Azure/application-gateway-kubernetes-ingress/pull/190.diff","patch_url":"https://github.com/Azure/application-gateway-kubernetes-ingress/pull/190.patch","issue_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/190","number":190,"state":"open","locked":false,"title":"controller: Cache config between processing events","user":{"login":"draychev","id":49918230,"node_id":"MDQ6VXNlcjQ5OTE4MjMw","avatar_url":"https://avatars1.githubusercontent.com/u/49918230?v=4","gravatar_id":"","url":"https://api.github.com/users/draychev","html_url":"https://github.com/draychev","followers_url":"https://api.github.com/users/draychev/followers","following_url":"https://api.github.com/users/draychev/following{/other_user}","gists_url":"https://api.github.com/users/draychev/gists{/gist_id}","starred_url":"https://api.github.com/users/draychev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draychev/subscriptions","organizations_url":"https://api.github.com/users/draychev/orgs","repos_url":"https://api.github.com/users/draychev/repos","events_url":"https://api.github.com/users/draychev/events{/privacy}","received_events_url":"https://api.github.com/users/draychev/received_events","type":"User","site_admin":false},"body":"In this PR we introduce config cache into the Ingress Controller.  The purpose of this is to eliminate unnecessary HTTP calls to ARM.\r\n\r\nThe cache is a simple byte array holding serialized version of the config last posted.\r\nWe introduce a bit of complexity in order to remove the `ETag` keys, which change between re-configs and act as cache busters.\r\n\r\nChanges:\r\n  - added `configCache *[]byte` to the `AppGwIngressController ` struct\r\n  - created `configIsSame()` function to determine whether the config to be posted to ARM is any different than what was previously posted\r\n  - `deleteKeyFromJSON` function uses the output of the the SDK's `MarshallJSON()`, and deletes given JSON key (`ETag` in our case)\r\n  - `deleteKey()` - a helper function used by `configIsSame`, which when given a map, recursively finds the key to delete and deletes it.","created_at":"2019-05-17T22:36:15Z","updated_at":"2019-05-17T22:36:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[{"login":"asridharan","id":3128730,"node_id":"MDQ6VXNlcjMxMjg3MzA=","avatar_url":"https://avatars3.githubusercontent.com/u/3128730?v=4","gravatar_id":"","url":"https://api.github.com/users/asridharan","html_url":"https://github.com/asridharan","followers_url":"https://api.github.com/users/asridharan/followers","following_url":"https://api.github.com/users/asridharan/following{/other_user}","gists_url":"https://api.github.com/users/asridharan/gists{/gist_id}","starred_url":"https://api.github.com/users/asridharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asridharan/subscriptions","organizations_url":"https://api.github.com/users/asridharan/orgs","repos_url":"https://api.github.com/users/asridharan/repos","events_url":"https://api.github.com/users/asridharan/events{/privacy}","received_events_url":"https://api.github.com/users/asridharan/received_events","type":"User","site_admin":false},{"login":"akshaysngupta","id":5294363,"node_id":"MDQ6VXNlcjUyOTQzNjM=","avatar_url":"https://avatars1.githubusercontent.com/u/5294363?v=4","gravatar_id":"","url":"https://api.github.com/users/akshaysngupta","html_url":"https://github.com/akshaysngupta","followers_url":"https://api.github.com/users/akshaysngupta/followers","following_url":"https://api.github.com/users/akshaysngupta/following{/other_user}","gists_url":"https://api.github.com/users/akshaysngupta/gists{/gist_id}","starred_url":"https://api.github.com/users/akshaysngupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshaysngupta/subscriptions","organizations_url":"https://api.github.com/users/akshaysngupta/orgs","repos_url":"https://api.github.com/users/akshaysngupta/repos","events_url":"https://api.github.com/users/akshaysngupta/events{/privacy}","received_events_url":"https://api.github.com/users/akshaysngupta/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/190/commits","review_comments_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/190/comments","review_comment_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/190/comments","statuses_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/statuses/9217422e3f8c0a48874a416c715d5efd8f2fdbcb","head":{"label":"Azure:draychev/cache-config","ref":"draychev/cache-config","sha":"9217422e3f8c0a48874a416c715d5efd8f2fdbcb","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":146650795,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2NTA3OTU=","name":"application-gateway-kubernetes-ingress","full_name":"Azure/application-gateway-kubernetes-ingress","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/application-gateway-kubernetes-ingress","description":"This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.","fork":false,"url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress","forks_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/forks","keys_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/teams","hooks_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/hooks","issue_events_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/events","assignees_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/tags","blobs_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/languages","stargazers_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/stargazers","contributors_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/contributors","subscribers_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/subscribers","subscription_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/subscription","commits_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/merges","archive_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/downloads","issues_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/labels{/name}","releases_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/deployments","created_at":"2018-08-29T19:52:40Z","updated_at":"2019-05-17T19:36:06Z","pushed_at":"2019-05-17T22:35:46Z","git_url":"git://github.com/Azure/application-gateway-kubernetes-ingress.git","ssh_url":"git@github.com:Azure/application-gateway-kubernetes-ingress.git","clone_url":"https://github.com/Azure/application-gateway-kubernetes-ingress.git","svn_url":"https://github.com/Azure/application-gateway-kubernetes-ingress","homepage":"https://azure.github.io/application-gateway-kubernetes-ingress","size":39680,"stargazers_count":112,"watchers_count":112,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":44,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":44,"open_issues":31,"watchers":112,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"b84b544ce0f2fdcfda2f9d60a2a373d9afd1714d","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":146650795,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2NTA3OTU=","name":"application-gateway-kubernetes-ingress","full_name":"Azure/application-gateway-kubernetes-ingress","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/application-gateway-kubernetes-ingress","description":"This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.","fork":false,"url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress","forks_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/forks","keys_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/teams","hooks_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/hooks","issue_events_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/events","assignees_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/tags","blobs_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/languages","stargazers_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/stargazers","contributors_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/contributors","subscribers_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/subscribers","subscription_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/subscription","commits_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/merges","archive_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/downloads","issues_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/labels{/name}","releases_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/deployments","created_at":"2018-08-29T19:52:40Z","updated_at":"2019-05-17T19:36:06Z","pushed_at":"2019-05-17T22:35:46Z","git_url":"git://github.com/Azure/application-gateway-kubernetes-ingress.git","ssh_url":"git@github.com:Azure/application-gateway-kubernetes-ingress.git","clone_url":"https://github.com/Azure/application-gateway-kubernetes-ingress.git","svn_url":"https://github.com/Azure/application-gateway-kubernetes-ingress","homepage":"https://azure.github.io/application-gateway-kubernetes-ingress","size":39680,"stargazers_count":112,"watchers_count":112,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":44,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":44,"open_issues":31,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/190"},"html":{"href":"https://github.com/Azure/application-gateway-kubernetes-ingress/pull/190"},"issue":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/190"},"comments":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/application-gateway-kubernetes-ingress/statuses/9217422e3f8c0a48874a416c715d5efd8f2fdbcb"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":5,"additions":188,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"draychev"}}