{"action":"created","issue":{"url":"https://api.github.com/repos/abonas/kubeclient/issues/103","labels_url":"https://api.github.com/repos/abonas/kubeclient/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/abonas/kubeclient/issues/103/comments","events_url":"https://api.github.com/repos/abonas/kubeclient/issues/103/events","html_url":"https://github.com/abonas/kubeclient/issues/103","id":95471939,"number":103,"title":"Support Scaling ReplicationControllers","user":{"login":"iterion","id":145272,"avatar_url":"https://avatars.githubusercontent.com/u/145272?v=3","gravatar_id":"","url":"https://api.github.com/users/iterion","html_url":"https://github.com/iterion","followers_url":"https://api.github.com/users/iterion/followers","following_url":"https://api.github.com/users/iterion/following{/other_user}","gists_url":"https://api.github.com/users/iterion/gists{/gist_id}","starred_url":"https://api.github.com/users/iterion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iterion/subscriptions","organizations_url":"https://api.github.com/users/iterion/orgs","repos_url":"https://api.github.com/users/iterion/repos","events_url":"https://api.github.com/users/iterion/events{/privacy}","received_events_url":"https://api.github.com/users/iterion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-16T16:24:23Z","updated_at":"2015-07-16T17:58:50Z","closed_at":null,"body":"It would be nice to have an easy way to scale ReplicationControllers. The API I was considering would be something along the lines of:\r\n\r\nOption 1:\r\n```ruby\r\nclient = Kubeclient.new\r\nrc = client.get_replication_controller(\"my-rc\")\r\nrc.scale(5)\r\n```\r\n\r\nOption 2:\r\n```ruby\r\nclient = Kubeclient.new\r\nclient.scale_replication_controller(\"my-rc\", 5)\r\n```\r\n\r\nOr perhaps support both? I think they both have cases where each is more ergonomic to use than the other. I'm working on a project that will need support for this so I'm happy to implement, but was just looking for opinions on what the API should look like."},"comment":{"url":"https://api.github.com/repos/abonas/kubeclient/issues/comments/122035909","html_url":"https://github.com/abonas/kubeclient/issues/103#issuecomment-122035909","issue_url":"https://api.github.com/repos/abonas/kubeclient/issues/103","id":122035909,"user":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T17:58:50Z","updated_at":"2015-07-16T17:58:50Z","body":"> Thanks, I'll try that out, it'll be useful in the interim.\r\n> \r\n> I think scaling of replicas is something that users might do fairly often, so it'd be useful to have a method to do just that. But, I suppose it's up for discussion if that should be part of this gem or part of a gem that utilizes this one. A specific utility for scaling replicas is part of the Kubernetes CLI, so it might be good to mirror what is offered there.\r\n\r\nI'm currently not in favor of adding custom methods per entity, it's hard to maintain and the goal here is not to mimic the cli, but to allow the work with REST api which is by itself pretty standard and has no custom actions/methods for those things in the server. \r\nHaving said that, nothing is carved in stone, and it can be re-evaluated in the future.\r\n"}}