{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33843","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33843/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33843/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33843/events","html_url":"https://github.com/kubernetes/kubernetes/issues/33843","id":180349063,"number":33843,"title":"Feature request: ability to specify a min/max replica count on scaleable resources","user":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/deployment","name":"area/deployment","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/workloads","name":"team/workloads","color":"d2b48c"}],"state":"open","locked":false,"assignee":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"assignees":[{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.5","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23/labels","id":1945978,"number":23,"title":"v1.5","description":"","creator":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"open_issues":222,"closed_issues":103,"state":"open","created_at":"2016-08-16T21:47:28Z","updated_at":"2016-09-30T16:41:06Z","due_on":"2016-12-09T00:00:00Z","closed_at":null},"comments":4,"created_at":"2016-09-30T16:39:06Z","updated_at":"2016-09-30T17:14:24Z","closed_at":null,"body":"Users have requested the ability to set local min/max replica constraints for any resource that is a target for manual scaling (i.e. Deployment / ReplicaSet / ReplicationController / Job / PetSet).  \r\n\r\nThe idea is that each spec for the related resources would have the following (similar to HPA):\r\n\r\n```\r\n// lower limit for the number of replicas (defaults to 0)\r\nMinReplicas *int32 `json:\"minReplicas,omitempty\"`\r\n// upper limit for the number of replicas\r\nMaxReplicas *int32 `json:\"maxReplicas,omitempty\"`\r\n```\r\n\r\nIf a user submitted a `kubectl scale` command that caused `Replicas` to fall out of the configured boundary, the request would fail validation, and not proceed.\r\n\r\nThe example use case is as follows:\r\n>When deploying a database (pod) with no replication using persistent volumes and persistent volume claims, I want to restrict the scaling of the pod to no more than one replica.  The reason is that I don't want data distributed over various persistent stores causing fragmentation.\r\n\r\nKeeping a min/max local to the resource may make the most sense, and is easily enforceable via validation.  I had debated a pattern using `LimitRange` but that has the drawback that the scope covered is too large.  While I am interested in adding label selectors to LimitRange to let you scope constraints to particular classes of things better, I think in this case, it may make the most sense to have min/max replicas on the local resource that is being constrained most closely.\r\n\r\nThoughts?\r\n\r\n/cc @smarterclayton @eparis @bgrant0607 @lavalamp "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/250800765","html_url":"https://github.com/kubernetes/kubernetes/issues/33843#issuecomment-250800765","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33843","id":250800765,"user":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T17:14:24Z","updated_at":"2016-09-30T17:14:24Z","body":"@bgrant0607 - my response echoed your sentiment, but I got a fair amount of push-back from three distinct user communities looking to support Spark, Gluster, and a mobile application scenario.\r\n\r\nAt it's core the request is asking to have a way to prevent users from harming themselves.  User's can harm themselves any number of ways, so I get the complexity/cumbersome argument may not be worth it for all workloads.\r\n\r\nAny objection to the concept via annotations on the objects in question, and enforcement via some optional admission controller?  If it gets broad adoption, then we could revisit when more bandwidth is needed?"}}
{"actor":{"display_login":"derekwaynecarr"}}