{"action":"created","comment":{"url":"https://api.github.com/repos/kiali/kiali/pulls/comments/219174317","pull_request_review_id":157282183,"id":219174317,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTE3NDMxNw==","diff_hunk":"@@ -21,10 +27,52 @@ func (a DeadNodeAppender) AppendGraph(trafficMap graph.TrafficMap, _ string) {\n \tbusiness, err := business.Get()\n \tcheckError(err)\n \n-\tapplyDeadNodes(trafficMap, business.Workload)\n+\tif a.serviceEntries == nil {\n+\t\ta.serviceEntries = fetchServiceEntries(business)\n+\t}\n+\n+\tapplyDeadNodes(trafficMap, business.Workload, a.serviceEntries)\n+}\n+\n+// fetchServiceEntries queries the cluster API to retrieve ServiceEntries resources\n+// across all namespaces in the cluster.\n+// All ServiceEntries are needed, because Istio does not distinguish where the\n+// ServiceEntries are created when routing egress traffic.\n+func fetchServiceEntries(bLayer *business.Layer) models.ServiceEntries {\n+\tnamespaces, err := bLayer.Namespace.GetNamespaces()\n+\tcheckError(err)\n+\n+\tserviceEntries := models.ServiceEntries{}\n+\tfor _, ns := range namespaces {\n+\t\tistioCfg, err := bLayer.IstioConfig.GetIstioConfig(business.IstioConfigCriteria{\n+\t\t\tIncludeServiceEntries: true,\n+\t\t\tNamespace:             ns.Name,\n+\t\t})\n+\t\tcheckError(err)\n+\n+\t\tserviceEntries = append(serviceEntries, istioCfg.ServiceEntries...)\n+\t}\n+\n+\treturn serviceEntries\n+}\n+\n+// isExternalService checks whether node represents an external service (egress traffic), looking\n+// for a matching egress rule in serviceEntries.\n+func isExternalService(node *graph.Node, serviceEntries models.ServiceEntries) bool {","path":"graph/appender/dead_node.go","position":59,"original_position":59,"commit_id":"017ebf56566b5f1e4d63e6ad5c3b7539e62d3938","original_commit_id":"017ebf56566b5f1e4d63e6ad5c3b7539e62d3938","user":{"login":"jmazzitelli","id":2029470,"node_id":"MDQ6VXNlcjIwMjk0NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/2029470?v=4","gravatar_id":"","url":"https://api.github.com/users/jmazzitelli","html_url":"https://github.com/jmazzitelli","followers_url":"https://api.github.com/users/jmazzitelli/followers","following_url":"https://api.github.com/users/jmazzitelli/following{/other_user}","gists_url":"https://api.github.com/users/jmazzitelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazzitelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazzitelli/subscriptions","organizations_url":"https://api.github.com/users/jmazzitelli/orgs","repos_url":"https://api.github.com/users/jmazzitelli/repos","events_url":"https://api.github.com/users/jmazzitelli/events{/privacy}","received_events_url":"https://api.github.com/users/jmazzitelli/received_events","type":"User","site_admin":false},"body":"Should this be passing by reference? (e.g. use \"serviceEntries *models.ServiceEntries\") --- this would avoid having to make a copy these entries every time we check a node. I'm not sure now large these ServiceEntries maps are, maybe its not a big deal. But it seems if we are going to call this for every node in the graph, we should think about passing this cache of service entries by reference.","created_at":"2018-09-20T13:59:15Z","updated_at":"2018-09-20T13:59:21Z","html_url":"https://github.com/kiali/kiali/pull/506#discussion_r219174317","pull_request_url":"https://api.github.com/repos/kiali/kiali/pulls/506","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kiali/kiali/pulls/comments/219174317"},"html":{"href":"https://github.com/kiali/kiali/pull/506#discussion_r219174317"},"pull_request":{"href":"https://api.github.com/repos/kiali/kiali/pulls/506"}}},"pull_request":{"url":"https://api.github.com/repos/kiali/kiali/pulls/506","id":216794656,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2Nzk0NjU2","html_url":"https://github.com/kiali/kiali/pull/506","diff_url":"https://github.com/kiali/kiali/pull/506.diff","patch_url":"https://github.com/kiali/kiali/pull/506.patch","issue_url":"https://api.github.com/repos/kiali/kiali/issues/506","number":506,"state":"open","locked":false,"title":"KIALI-1526 Show services nodes representing egress traffic","user":{"login":"israel-hdez","id":23639005,"node_id":"MDQ6VXNlcjIzNjM5MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/23639005?v=4","gravatar_id":"","url":"https://api.github.com/users/israel-hdez","html_url":"https://github.com/israel-hdez","followers_url":"https://api.github.com/users/israel-hdez/followers","following_url":"https://api.github.com/users/israel-hdez/following{/other_user}","gists_url":"https://api.github.com/users/israel-hdez/gists{/gist_id}","starred_url":"https://api.github.com/users/israel-hdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/israel-hdez/subscriptions","organizations_url":"https://api.github.com/users/israel-hdez/orgs","repos_url":"https://api.github.com/users/israel-hdez/repos","events_url":"https://api.github.com/users/israel-hdez/events{/privacy}","received_events_url":"https://api.github.com/users/israel-hdez/received_events","type":"User","site_admin":false},"body":"This is adding an exception to the dead node appender. This will allow terminal service nodes to be shown in the graph if those nodes are representing traffic going outside of the cluster.\r\n\r\n** Backwards incompatible? **\r\n- [ ] Is your change introducing backwards incompatible changes? **Nope**\r\n","created_at":"2018-09-19T22:24:44Z","updated_at":"2018-09-20T13:59:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dacc96420cc5a7f676221a40cb78bcaf562082e3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mwringe","id":691166,"node_id":"MDQ6VXNlcjY5MTE2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/691166?v=4","gravatar_id":"","url":"https://api.github.com/users/mwringe","html_url":"https://github.com/mwringe","followers_url":"https://api.github.com/users/mwringe/followers","following_url":"https://api.github.com/users/mwringe/following{/other_user}","gists_url":"https://api.github.com/users/mwringe/gists{/gist_id}","starred_url":"https://api.github.com/users/mwringe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwringe/subscriptions","organizations_url":"https://api.github.com/users/mwringe/orgs","repos_url":"https://api.github.com/users/mwringe/repos","events_url":"https://api.github.com/users/mwringe/events{/privacy}","received_events_url":"https://api.github.com/users/mwringe/received_events","type":"User","site_admin":false},{"login":"jshaughn","id":2104052,"node_id":"MDQ6VXNlcjIxMDQwNTI=","avatar_url":"https://avatars1.githubusercontent.com/u/2104052?v=4","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kiali/kiali/pulls/506/commits","review_comments_url":"https://api.github.com/repos/kiali/kiali/pulls/506/comments","review_comment_url":"https://api.github.com/repos/kiali/kiali/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiali/kiali/issues/506/comments","statuses_url":"https://api.github.com/repos/kiali/kiali/statuses/017ebf56566b5f1e4d63e6ad5c3b7539e62d3938","head":{"label":"israel-hdez:kiali-1526","ref":"kiali-1526","sha":"017ebf56566b5f1e4d63e6ad5c3b7539e62d3938","user":{"login":"israel-hdez","id":23639005,"node_id":"MDQ6VXNlcjIzNjM5MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/23639005?v=4","gravatar_id":"","url":"https://api.github.com/users/israel-hdez","html_url":"https://github.com/israel-hdez","followers_url":"https://api.github.com/users/israel-hdez/followers","following_url":"https://api.github.com/users/israel-hdez/following{/other_user}","gists_url":"https://api.github.com/users/israel-hdez/gists{/gist_id}","starred_url":"https://api.github.com/users/israel-hdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/israel-hdez/subscriptions","organizations_url":"https://api.github.com/users/israel-hdez/orgs","repos_url":"https://api.github.com/users/israel-hdez/repos","events_url":"https://api.github.com/users/israel-hdez/events{/privacy}","received_events_url":"https://api.github.com/users/israel-hdez/received_events","type":"User","site_admin":false},"repo":{"id":124584884,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ1ODQ4ODQ=","name":"swscore","full_name":"israel-hdez/swscore","private":false,"owner":{"login":"israel-hdez","id":23639005,"node_id":"MDQ6VXNlcjIzNjM5MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/23639005?v=4","gravatar_id":"","url":"https://api.github.com/users/israel-hdez","html_url":"https://github.com/israel-hdez","followers_url":"https://api.github.com/users/israel-hdez/followers","following_url":"https://api.github.com/users/israel-hdez/following{/other_user}","gists_url":"https://api.github.com/users/israel-hdez/gists{/gist_id}","starred_url":"https://api.github.com/users/israel-hdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/israel-hdez/subscriptions","organizations_url":"https://api.github.com/users/israel-hdez/orgs","repos_url":"https://api.github.com/users/israel-hdez/repos","events_url":"https://api.github.com/users/israel-hdez/events{/privacy}","received_events_url":"https://api.github.com/users/israel-hdez/received_events","type":"User","site_admin":false},"html_url":"https://github.com/israel-hdez/swscore","description":null,"fork":true,"url":"https://api.github.com/repos/israel-hdez/swscore","forks_url":"https://api.github.com/repos/israel-hdez/swscore/forks","keys_url":"https://api.github.com/repos/israel-hdez/swscore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/israel-hdez/swscore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/israel-hdez/swscore/teams","hooks_url":"https://api.github.com/repos/israel-hdez/swscore/hooks","issue_events_url":"https://api.github.com/repos/israel-hdez/swscore/issues/events{/number}","events_url":"https://api.github.com/repos/israel-hdez/swscore/events","assignees_url":"https://api.github.com/repos/israel-hdez/swscore/assignees{/user}","branches_url":"https://api.github.com/repos/israel-hdez/swscore/branches{/branch}","tags_url":"https://api.github.com/repos/israel-hdez/swscore/tags","blobs_url":"https://api.github.com/repos/israel-hdez/swscore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/israel-hdez/swscore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/israel-hdez/swscore/git/refs{/sha}","trees_url":"https://api.github.com/repos/israel-hdez/swscore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/israel-hdez/swscore/statuses/{sha}","languages_url":"https://api.github.com/repos/israel-hdez/swscore/languages","stargazers_url":"https://api.github.com/repos/israel-hdez/swscore/stargazers","contributors_url":"https://api.github.com/repos/israel-hdez/swscore/contributors","subscribers_url":"https://api.github.com/repos/israel-hdez/swscore/subscribers","subscription_url":"https://api.github.com/repos/israel-hdez/swscore/subscription","commits_url":"https://api.github.com/repos/israel-hdez/swscore/commits{/sha}","git_commits_url":"https://api.github.com/repos/israel-hdez/swscore/git/commits{/sha}","comments_url":"https://api.github.com/repos/israel-hdez/swscore/comments{/number}","issue_comment_url":"https://api.github.com/repos/israel-hdez/swscore/issues/comments{/number}","contents_url":"https://api.github.com/repos/israel-hdez/swscore/contents/{+path}","compare_url":"https://api.github.com/repos/israel-hdez/swscore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/israel-hdez/swscore/merges","archive_url":"https://api.github.com/repos/israel-hdez/swscore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/israel-hdez/swscore/downloads","issues_url":"https://api.github.com/repos/israel-hdez/swscore/issues{/number}","pulls_url":"https://api.github.com/repos/israel-hdez/swscore/pulls{/number}","milestones_url":"https://api.github.com/repos/israel-hdez/swscore/milestones{/number}","notifications_url":"https://api.github.com/repos/israel-hdez/swscore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/israel-hdez/swscore/labels{/name}","releases_url":"https://api.github.com/repos/israel-hdez/swscore/releases{/id}","deployments_url":"https://api.github.com/repos/israel-hdez/swscore/deployments","created_at":"2018-03-09T19:35:54Z","updated_at":"2018-09-18T16:04:08Z","pushed_at":"2018-09-20T13:46:47Z","git_url":"git://github.com/israel-hdez/swscore.git","ssh_url":"git@github.com:israel-hdez/swscore.git","clone_url":"https://github.com/israel-hdez/swscore.git","svn_url":"https://github.com/israel-hdez/swscore","homepage":null,"size":11956,"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":"kiali:master","ref":"master","sha":"f0353d7b757b66018ebdf830be6d1dbfb373bf21","user":{"login":"kiali","id":36001875,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MDAxODc1","avatar_url":"https://avatars2.githubusercontent.com/u/36001875?v=4","gravatar_id":"","url":"https://api.github.com/users/kiali","html_url":"https://github.com/kiali","followers_url":"https://api.github.com/users/kiali/followers","following_url":"https://api.github.com/users/kiali/following{/other_user}","gists_url":"https://api.github.com/users/kiali/gists{/gist_id}","starred_url":"https://api.github.com/users/kiali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiali/subscriptions","organizations_url":"https://api.github.com/users/kiali/orgs","repos_url":"https://api.github.com/users/kiali/repos","events_url":"https://api.github.com/users/kiali/events{/privacy}","received_events_url":"https://api.github.com/users/kiali/received_events","type":"Organization","site_admin":false},"repo":{"id":120181748,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAxODE3NDg=","name":"kiali","full_name":"kiali/kiali","private":false,"owner":{"login":"kiali","id":36001875,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MDAxODc1","avatar_url":"https://avatars2.githubusercontent.com/u/36001875?v=4","gravatar_id":"","url":"https://api.github.com/users/kiali","html_url":"https://github.com/kiali","followers_url":"https://api.github.com/users/kiali/followers","following_url":"https://api.github.com/users/kiali/following{/other_user}","gists_url":"https://api.github.com/users/kiali/gists{/gist_id}","starred_url":"https://api.github.com/users/kiali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiali/subscriptions","organizations_url":"https://api.github.com/users/kiali/orgs","repos_url":"https://api.github.com/users/kiali/repos","events_url":"https://api.github.com/users/kiali/events{/privacy}","received_events_url":"https://api.github.com/users/kiali/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kiali/kiali","description":"Kiali project, observability for the Istio service mesh","fork":false,"url":"https://api.github.com/repos/kiali/kiali","forks_url":"https://api.github.com/repos/kiali/kiali/forks","keys_url":"https://api.github.com/repos/kiali/kiali/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiali/kiali/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiali/kiali/teams","hooks_url":"https://api.github.com/repos/kiali/kiali/hooks","issue_events_url":"https://api.github.com/repos/kiali/kiali/issues/events{/number}","events_url":"https://api.github.com/repos/kiali/kiali/events","assignees_url":"https://api.github.com/repos/kiali/kiali/assignees{/user}","branches_url":"https://api.github.com/repos/kiali/kiali/branches{/branch}","tags_url":"https://api.github.com/repos/kiali/kiali/tags","blobs_url":"https://api.github.com/repos/kiali/kiali/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiali/kiali/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiali/kiali/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiali/kiali/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiali/kiali/statuses/{sha}","languages_url":"https://api.github.com/repos/kiali/kiali/languages","stargazers_url":"https://api.github.com/repos/kiali/kiali/stargazers","contributors_url":"https://api.github.com/repos/kiali/kiali/contributors","subscribers_url":"https://api.github.com/repos/kiali/kiali/subscribers","subscription_url":"https://api.github.com/repos/kiali/kiali/subscription","commits_url":"https://api.github.com/repos/kiali/kiali/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiali/kiali/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiali/kiali/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiali/kiali/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiali/kiali/contents/{+path}","compare_url":"https://api.github.com/repos/kiali/kiali/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiali/kiali/merges","archive_url":"https://api.github.com/repos/kiali/kiali/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiali/kiali/downloads","issues_url":"https://api.github.com/repos/kiali/kiali/issues{/number}","pulls_url":"https://api.github.com/repos/kiali/kiali/pulls{/number}","milestones_url":"https://api.github.com/repos/kiali/kiali/milestones{/number}","notifications_url":"https://api.github.com/repos/kiali/kiali/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiali/kiali/labels{/name}","releases_url":"https://api.github.com/repos/kiali/kiali/releases{/id}","deployments_url":"https://api.github.com/repos/kiali/kiali/deployments","created_at":"2018-02-04T12:11:57Z","updated_at":"2018-09-20T13:02:04Z","pushed_at":"2018-09-20T13:46:48Z","git_url":"git://github.com/kiali/kiali.git","ssh_url":"git@github.com:kiali/kiali.git","clone_url":"https://github.com/kiali/kiali.git","svn_url":"https://github.com/kiali/kiali","homepage":"https://kiali.io","size":11986,"stargazers_count":311,"watchers_count":311,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":25,"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":55,"open_issues":25,"watchers":311,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kiali/kiali/pulls/506"},"html":{"href":"https://github.com/kiali/kiali/pull/506"},"issue":{"href":"https://api.github.com/repos/kiali/kiali/issues/506"},"comments":{"href":"https://api.github.com/repos/kiali/kiali/issues/506/comments"},"review_comments":{"href":"https://api.github.com/repos/kiali/kiali/pulls/506/comments"},"review_comment":{"href":"https://api.github.com/repos/kiali/kiali/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiali/kiali/pulls/506/commits"},"statuses":{"href":"https://api.github.com/repos/kiali/kiali/statuses/017ebf56566b5f1e4d63e6ad5c3b7539e62d3938"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jmazzitelli"}}