{"action":"created","issue":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/issues/59","repository_url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/issues/59/comments","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/issues/59/events","html_url":"https://github.com/rabbitmq/rabbitmq-autocluster/pull/59","id":273736953,"number":59,"title":"Add RBAC support","user":{"login":"rfancn","id":7530675,"avatar_url":"https://avatars3.githubusercontent.com/u/7530675?v=4","gravatar_id":"","url":"https://api.github.com/users/rfancn","html_url":"https://github.com/rfancn","followers_url":"https://api.github.com/users/rfancn/followers","following_url":"https://api.github.com/users/rfancn/following{/other_user}","gists_url":"https://api.github.com/users/rfancn/gists{/gist_id}","starred_url":"https://api.github.com/users/rfancn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfancn/subscriptions","organizations_url":"https://api.github.com/users/rfancn/orgs","repos_url":"https://api.github.com/users/rfancn/repos","events_url":"https://api.github.com/users/rfancn/events{/privacy}","received_events_url":"https://api.github.com/users/rfancn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-14T10:18:15Z","updated_at":"2017-11-14T11:23:14Z","closed_at":"2017-11-14T11:23:14Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/pulls/59","html_url":"https://github.com/rabbitmq/rabbitmq-autocluster/pull/59","diff_url":"https://github.com/rabbitmq/rabbitmq-autocluster/pull/59.diff","patch_url":"https://github.com/rabbitmq/rabbitmq-autocluster/pull/59.patch"},"body":"## Proposed Changes\r\nSince kubernetes 1.6, RBAC was introduced and kubeadm enabled RBAC by default in the latest releases.\r\nIf RBAC is enabled and autocluster backend using k8s,  when autocluster try to find_best_node_to_join, it will access endpoints resource on kubernetes API server, if no corresponding role/rolebinding/serviceaccount exist at this time, the https request will be failed as below:\r\n```\r\n=INFO REPORT==== 14-Nov-2017::10:12:30 ===\r\nautocluster: GET https://kubernetes.default.svc.cluster.local:443/api/v1/namespaces/default/endpoints/rabbitmq\r\n\r\n=INFO REPORT==== 14-Nov-2017::10:12:30 ===\r\nautocluster: Response: [{ok,{{\"HTTP/1.1\",403,\"Forbidden\"},\r\n                             [{\"date\",\"Tue, 14 Nov 2017 10:12:30 GMT\"},\r\n                              {\"content-length\",\"93\"},\r\n                              {\"content-type\",\"text/plain\"},\r\n                              {\"x-content-type-options\",\"nosniff\"}],\r\n                             \"User \\\"system:serviceaccount:default:default\\\" cannot get endpoints in the namespace \\\"default\\\".\"}}]\r\n```\r\n\r\nBelow files changed and added to suport RBAC:\r\n\r\n- Created rabbitmq-rbac.yaml to setup new role/rolebinding/serviceaccount for rabbitmq\r\n- Changed README.md(add instruction to apply rabbitmq-rbac.yaml)\r\n- Add \"serviceAccountName\" in rabbitmq.yaml\r\n\r\n## Types of Changes\r\n- [ ] Bugfix (non-breaking change which fixes issue #NNNN)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n- [x ] Documentation (correction or otherwise)\r\n- [ ] Cosmetics (whitespace, appearance)\r\n\r\n## Checklist\r\n- [ x] I have read the `CONTRIBUTING.md` document\r\n- [ ] I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)\r\n- [x ] All tests pass locally with my changes\r\n- [ ] I have added tests that prove my fix is effective or that my feature works\r\n- [x ] I have added necessary documentation (if appropriate)\r\n- [ ] Any dependent changes have been merged and published in related repositories\r\n\r\n## Further Comments\r\nN/A\r\n"},"comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/issues/comments/344228832","html_url":"https://github.com/rabbitmq/rabbitmq-autocluster/pull/59#issuecomment-344228832","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-autocluster/issues/59","id":344228832,"user":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars3.githubusercontent.com/u/1090?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"created_at":"2017-11-14T11:23:14Z","updated_at":"2017-11-14T11:23:14Z","author_association":"OWNER","body":"@rfancn let's move to using a new example and basing it on the `stable` branch (and submitting a new PR against it). Thank you for your time!"}}
{"actor":{"display_login":"michaelklishin"}}