{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/156","repository_url":"https://api.github.com/repos/kubernetes-sigs/kustomize","labels_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/156/comments","events_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/156/events","html_url":"https://github.com/kubernetes-sigs/kustomize/pull/156","id":339608472,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMjIwODM4","number":156,"title":"Support variable reference for ClusterRoleBinding subject namespace","user":{"login":"jlegrone","id":6752382,"node_id":"MDQ6VXNlcjY3NTIzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/6752382?v=4","gravatar_id":"","url":"https://api.github.com/users/jlegrone","html_url":"https://github.com/jlegrone","followers_url":"https://api.github.com/users/jlegrone/followers","following_url":"https://api.github.com/users/jlegrone/following{/other_user}","gists_url":"https://api.github.com/users/jlegrone/gists{/gist_id}","starred_url":"https://api.github.com/users/jlegrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlegrone/subscriptions","organizations_url":"https://api.github.com/users/jlegrone/orgs","repos_url":"https://api.github.com/users/jlegrone/repos","events_url":"https://api.github.com/users/jlegrone/events{/privacy}","received_events_url":"https://api.github.com/users/jlegrone/received_events","type":"User","site_admin":false},"labels":[{"id":930398993,"node_id":"MDU6TGFiZWw5MzAzOTg5OTM=","url":"https://api.github.com/repos/kubernetes-sigs/kustomize/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":930399082,"node_id":"MDU6TGFiZWw5MzAzOTkwODI=","url":"https://api.github.com/repos/kubernetes-sigs/kustomize/labels/size/XS","name":"size/XS","color":"009900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-09T21:09:54Z","updated_at":"2018-07-09T21:12:10Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/156","html_url":"https://github.com/kubernetes-sigs/kustomize/pull/156","diff_url":"https://github.com/kubernetes-sigs/kustomize/pull/156.diff","patch_url":"https://github.com/kubernetes-sigs/kustomize/pull/156.patch"},"body":"This may not be considered a direct fix for #136, but it does provide a workaround in the form of allowing the user to reference a variable from the namespace field of a ClusterRoleBinding subject.\r\n\r\n```yaml\r\n# kustomization.yaml\r\nresources:\r\n- serviceaccount.yaml\r\n- clusterrolebinding.yaml\r\n\r\nvars:\r\n- name: SERVICEACCOUNT_NAMESPACE\r\n  objref:\r\n    kind: ServiceAccount\r\n    name: my-crd\r\n    apiVersion: v1\r\n  fieldref:\r\n    fieldpath: metadata.namespace\r\n```\r\n\r\n```yaml\r\n# serviceaccount.yaml\r\napiVersion: v1\r\nkind: ServiceAccount\r\nmetadata:\r\n  name: my-crd\r\n```\r\n\r\n```yaml\r\n# clusterrolebinding.yaml\r\napiVersion: rbac.authorization.k8s.io/v1\r\nkind: ClusterRoleBinding\r\nmetadata:\r\n  name: my-crd\r\nroleRef:\r\n  apiGroup: rbac.authorization.k8s.io\r\n  kind: ClusterRole\r\n  name: cluster-admin\r\nsubjects:\r\n- kind: ServiceAccount\r\n  name: my-crd\r\n  namespace: $(SERVICEACCOUNT_NAMESPACE)\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/comments/403622053","html_url":"https://github.com/kubernetes-sigs/kustomize/pull/156#issuecomment-403622053","issue_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/156","id":403622053,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzYyMjA1Mw==","user":{"login":"jlegrone","id":6752382,"node_id":"MDQ6VXNlcjY3NTIzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/6752382?v=4","gravatar_id":"","url":"https://api.github.com/users/jlegrone","html_url":"https://github.com/jlegrone","followers_url":"https://api.github.com/users/jlegrone/followers","following_url":"https://api.github.com/users/jlegrone/following{/other_user}","gists_url":"https://api.github.com/users/jlegrone/gists{/gist_id}","starred_url":"https://api.github.com/users/jlegrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlegrone/subscriptions","organizations_url":"https://api.github.com/users/jlegrone/orgs","repos_url":"https://api.github.com/users/jlegrone/repos","events_url":"https://api.github.com/users/jlegrone/events{/privacy}","received_events_url":"https://api.github.com/users/jlegrone/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T21:12:10Z","updated_at":"2018-07-09T21:12:10Z","author_association":"NONE","body":"/assign @Liujingfang1 "}}
{"actor":{"display_login":"jlegrone"}}