{"action":"created","comment":{"url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/comments/242590883","pull_request_review_id":186137580,"id":242590883,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjU5MDg4Mw==","diff_hunk":"@@ -21,26 +26,40 @@ func newTypeMeta(apiVersion, kind string, modifiers ...helm.NodeModifier) *helm.\n \treturn mapping\n }\n \n-func newSelector(name string) *helm.Mapping {\n-\tmeta := helm.NewMapping()\n-\t// meta.Add(\"matchLabels\", helm.NewMapping(RoleNameLabel, name))\n+func newSelector(role *model.InstanceGroup, settings ExportSettings) *helm.Mapping {\n \t// XXX We need to match on legacy RoleNameLabel to maintain upgradability of stateful sets\n-\tmeta.Add(\"matchLabels\", helm.NewMapping(\"skiff-role-name\", name))\n+\tmatchLabels := helm.NewMapping(\"skiff-role-name\", role.Name)\n+\tif settings.IstioComplied && role.HasTag(model.RoleTagIstioManaged) {\n+\t\tmatchLabels.Add(AppNameLabel, role.Name)\n+\t\tif settings.CreateHelmChart {\n+\t\t\tmatchLabels.Add(AppVersionLable, `{{ default .Chart.Version .Chart.AppVersion | quote }}`)\n+\t\t}\n+\t}\n+\tmeta := helm.NewMapping(\"matchLabels\", matchLabels)\n+\n \treturn meta\n }\n \n // newKubeConfig sets up generic a Kube config structure with minimal metadata\n func newKubeConfig(settings ExportSettings, apiVersion, kind, name string, modifiers ...helm.NodeModifier) *helm.Mapping {\n \tlabels := helm.NewMapping(RoleNameLabel, name) // \"app.kubernetes.io/component\"\n+\tif settings.IstioComplied {\n+\t\tlabels.Add(AppNameLabel, name)\n+\t}\n+\n \tif settings.CreateHelmChart {\n \t\t// XXX skiff-role-name is the legacy RoleNameLabel and will be removed in a future release\n \t\tlabels.Add(\"skiff-role-name\", name)\n+\t\t// app: XXX is used by Istio","path":"kube/utils.go","position":44,"original_position":44,"commit_id":"fef546cba2f6717215326dc0d29774762fa2b22d","original_commit_id":"fef546cba2f6717215326dc0d29774762fa2b22d","user":{"login":"zhanggbj","id":4181847,"node_id":"MDQ6VXNlcjQxODE4NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4181847?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanggbj","html_url":"https://github.com/zhanggbj","followers_url":"https://api.github.com/users/zhanggbj/followers","following_url":"https://api.github.com/users/zhanggbj/following{/other_user}","gists_url":"https://api.github.com/users/zhanggbj/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanggbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanggbj/subscriptions","organizations_url":"https://api.github.com/users/zhanggbj/orgs","repos_url":"https://api.github.com/users/zhanggbj/repos","events_url":"https://api.github.com/users/zhanggbj/events{/privacy}","received_events_url":"https://api.github.com/users/zhanggbj/received_events","type":"User","site_admin":false},"body":"Will update in next patch.Thanks!","created_at":"2018-12-18T15:48:11Z","updated_at":"2018-12-18T15:48:12Z","html_url":"https://github.com/cloudfoundry-incubator/fissile/pull/457#discussion_r242590883","pull_request_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/comments/242590883"},"html":{"href":"https://github.com/cloudfoundry-incubator/fissile/pull/457#discussion_r242590883"},"pull_request":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457"}},"in_reply_to_id":242301343},"pull_request":{"url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457","id":238102387,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MTAyMzg3","html_url":"https://github.com/cloudfoundry-incubator/fissile/pull/457","diff_url":"https://github.com/cloudfoundry-incubator/fissile/pull/457.diff","patch_url":"https://github.com/cloudfoundry-incubator/fissile/pull/457.patch","issue_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues/457","number":457,"state":"open","locked":false,"title":"Add support to align with Istio conventions","user":{"login":"zhanggbj","id":4181847,"node_id":"MDQ6VXNlcjQxODE4NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4181847?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanggbj","html_url":"https://github.com/zhanggbj","followers_url":"https://api.github.com/users/zhanggbj/followers","following_url":"https://api.github.com/users/zhanggbj/following{/other_user}","gists_url":"https://api.github.com/users/zhanggbj/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanggbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanggbj/subscriptions","organizations_url":"https://api.github.com/users/zhanggbj/orgs","repos_url":"https://api.github.com/users/zhanggbj/repos","events_url":"https://api.github.com/users/zhanggbj/events{/privacy}","received_events_url":"https://api.github.com/users/zhanggbj/received_events","type":"User","site_admin":false},"body":"- Add an option for fissile to indicate whether to generate kube yaml and\r\n helm chart that have Istio conventions.\r\n- Fissile can choose whether to make a role managed by Istio by role tags\r\n\r\n[Story 162262084](https://www.pivotaltracker.com/story/show/162262084)","created_at":"2018-12-12T16:34:08Z","updated_at":"2018-12-18T15:48:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af6b8c1c27d410cc000818cf74487eefb99ad171","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457/commits","review_comments_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457/comments","review_comment_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues/457/comments","statuses_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/statuses/fef546cba2f6717215326dc0d29774762fa2b22d","head":{"label":"zhanggbj:comply-with-istio","ref":"comply-with-istio","sha":"fef546cba2f6717215326dc0d29774762fa2b22d","user":{"login":"zhanggbj","id":4181847,"node_id":"MDQ6VXNlcjQxODE4NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4181847?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanggbj","html_url":"https://github.com/zhanggbj","followers_url":"https://api.github.com/users/zhanggbj/followers","following_url":"https://api.github.com/users/zhanggbj/following{/other_user}","gists_url":"https://api.github.com/users/zhanggbj/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanggbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanggbj/subscriptions","organizations_url":"https://api.github.com/users/zhanggbj/orgs","repos_url":"https://api.github.com/users/zhanggbj/repos","events_url":"https://api.github.com/users/zhanggbj/events{/privacy}","received_events_url":"https://api.github.com/users/zhanggbj/received_events","type":"User","site_admin":false},"repo":{"id":125484736,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU0ODQ3MzY=","name":"fissile","full_name":"zhanggbj/fissile","private":false,"owner":{"login":"zhanggbj","id":4181847,"node_id":"MDQ6VXNlcjQxODE4NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4181847?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanggbj","html_url":"https://github.com/zhanggbj","followers_url":"https://api.github.com/users/zhanggbj/followers","following_url":"https://api.github.com/users/zhanggbj/following{/other_user}","gists_url":"https://api.github.com/users/zhanggbj/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanggbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanggbj/subscriptions","organizations_url":"https://api.github.com/users/zhanggbj/orgs","repos_url":"https://api.github.com/users/zhanggbj/repos","events_url":"https://api.github.com/users/zhanggbj/events{/privacy}","received_events_url":"https://api.github.com/users/zhanggbj/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhanggbj/fissile","description":"Turn a BOSH release into Docker images / files","fork":true,"url":"https://api.github.com/repos/zhanggbj/fissile","forks_url":"https://api.github.com/repos/zhanggbj/fissile/forks","keys_url":"https://api.github.com/repos/zhanggbj/fissile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhanggbj/fissile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhanggbj/fissile/teams","hooks_url":"https://api.github.com/repos/zhanggbj/fissile/hooks","issue_events_url":"https://api.github.com/repos/zhanggbj/fissile/issues/events{/number}","events_url":"https://api.github.com/repos/zhanggbj/fissile/events","assignees_url":"https://api.github.com/repos/zhanggbj/fissile/assignees{/user}","branches_url":"https://api.github.com/repos/zhanggbj/fissile/branches{/branch}","tags_url":"https://api.github.com/repos/zhanggbj/fissile/tags","blobs_url":"https://api.github.com/repos/zhanggbj/fissile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhanggbj/fissile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhanggbj/fissile/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhanggbj/fissile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhanggbj/fissile/statuses/{sha}","languages_url":"https://api.github.com/repos/zhanggbj/fissile/languages","stargazers_url":"https://api.github.com/repos/zhanggbj/fissile/stargazers","contributors_url":"https://api.github.com/repos/zhanggbj/fissile/contributors","subscribers_url":"https://api.github.com/repos/zhanggbj/fissile/subscribers","subscription_url":"https://api.github.com/repos/zhanggbj/fissile/subscription","commits_url":"https://api.github.com/repos/zhanggbj/fissile/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhanggbj/fissile/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhanggbj/fissile/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhanggbj/fissile/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhanggbj/fissile/contents/{+path}","compare_url":"https://api.github.com/repos/zhanggbj/fissile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhanggbj/fissile/merges","archive_url":"https://api.github.com/repos/zhanggbj/fissile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhanggbj/fissile/downloads","issues_url":"https://api.github.com/repos/zhanggbj/fissile/issues{/number}","pulls_url":"https://api.github.com/repos/zhanggbj/fissile/pulls{/number}","milestones_url":"https://api.github.com/repos/zhanggbj/fissile/milestones{/number}","notifications_url":"https://api.github.com/repos/zhanggbj/fissile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhanggbj/fissile/labels{/name}","releases_url":"https://api.github.com/repos/zhanggbj/fissile/releases{/id}","deployments_url":"https://api.github.com/repos/zhanggbj/fissile/deployments","created_at":"2018-03-16T08:12:24Z","updated_at":"2018-09-27T06:15:39Z","pushed_at":"2018-12-17T06:48:54Z","git_url":"git://github.com/zhanggbj/fissile.git","ssh_url":"git@github.com:zhanggbj/fissile.git","clone_url":"https://github.com/zhanggbj/fissile.git","svn_url":"https://github.com/zhanggbj/fissile","homepage":"","size":55229,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cloudfoundry-incubator:develop","ref":"develop","sha":"a19161d0d3cef0cc505f60c3d606f583eef3d8a1","user":{"login":"cloudfoundry-incubator","id":5680605,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2ODA2MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/5680605?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry-incubator","html_url":"https://github.com/cloudfoundry-incubator","followers_url":"https://api.github.com/users/cloudfoundry-incubator/followers","following_url":"https://api.github.com/users/cloudfoundry-incubator/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry-incubator/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry-incubator/orgs","repos_url":"https://api.github.com/users/cloudfoundry-incubator/repos","events_url":"https://api.github.com/users/cloudfoundry-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":42498148,"node_id":"MDEwOlJlcG9zaXRvcnk0MjQ5ODE0OA==","name":"fissile","full_name":"cloudfoundry-incubator/fissile","private":false,"owner":{"login":"cloudfoundry-incubator","id":5680605,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2ODA2MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/5680605?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry-incubator","html_url":"https://github.com/cloudfoundry-incubator","followers_url":"https://api.github.com/users/cloudfoundry-incubator/followers","following_url":"https://api.github.com/users/cloudfoundry-incubator/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry-incubator/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry-incubator/orgs","repos_url":"https://api.github.com/users/cloudfoundry-incubator/repos","events_url":"https://api.github.com/users/cloudfoundry-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry-incubator/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cloudfoundry-incubator/fissile","description":"Turn a BOSH release into container images / files","fork":false,"url":"https://api.github.com/repos/cloudfoundry-incubator/fissile","forks_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/forks","keys_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/teams","hooks_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/hooks","issue_events_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues/events{/number}","events_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/events","assignees_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/assignees{/user}","branches_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/branches{/branch}","tags_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/tags","blobs_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/languages","stargazers_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/stargazers","contributors_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/contributors","subscribers_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/subscribers","subscription_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/subscription","commits_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/contents/{+path}","compare_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/merges","archive_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/downloads","issues_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues{/number}","pulls_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/labels{/name}","releases_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/releases{/id}","deployments_url":"https://api.github.com/repos/cloudfoundry-incubator/fissile/deployments","created_at":"2015-09-15T05:51:21Z","updated_at":"2018-12-09T18:22:51Z","pushed_at":"2018-12-18T04:48:56Z","git_url":"git://github.com/cloudfoundry-incubator/fissile.git","ssh_url":"git@github.com:cloudfoundry-incubator/fissile.git","clone_url":"https://github.com/cloudfoundry-incubator/fissile.git","svn_url":"https://github.com/cloudfoundry-incubator/fissile","homepage":"","size":55280,"stargazers_count":59,"watchers_count":59,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":15,"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":29,"open_issues":15,"watchers":59,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457"},"html":{"href":"https://github.com/cloudfoundry-incubator/fissile/pull/457"},"issue":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues/457"},"comments":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/issues/457/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/pulls/457/commits"},"statuses":{"href":"https://api.github.com/repos/cloudfoundry-incubator/fissile/statuses/fef546cba2f6717215326dc0d29774762fa2b22d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"zhanggbj"}}