{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25238","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25238/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25238/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25238/events","html_url":"https://github.com/kubernetes/kubernetes/issues/25238","id":153352314,"node_id":"MDU6SXNzdWUxNTMzNTIzMTQ=","number":25238,"title":"Expected behavior for Deployment replicas with HPA during update","user":{"login":"verdverm","id":1390600,"node_id":"MDQ6VXNlcjEzOTA2MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/1390600?v=4","gravatar_id":"","url":"https://api.github.com/users/verdverm","html_url":"https://github.com/verdverm","followers_url":"https://api.github.com/users/verdverm/followers","following_url":"https://api.github.com/users/verdverm/following{/other_user}","gists_url":"https://api.github.com/users/verdverm/gists{/gist_id}","starred_url":"https://api.github.com/users/verdverm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verdverm/subscriptions","organizations_url":"https://api.github.com/users/verdverm/orgs","repos_url":"https://api.github.com/users/verdverm/repos","events_url":"https://api.github.com/users/verdverm/events{/privacy}","received_events_url":"https://api.github.com/users/verdverm/received_events","type":"User","site_admin":false},"labels":[{"id":126701924,"node_id":"MDU6TGFiZWwxMjY3MDE5MjQ=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/app-lifecycle","name":"area/app-lifecycle","color":"0052cc","default":false},{"id":382474515,"node_id":"MDU6TGFiZWwzODI0NzQ1MTU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/workload-api/deployment","name":"area/workload-api/deployment","color":"0052cc","default":false},{"id":105146071,"node_id":"MDU6TGFiZWwxMDUxNDYwNzE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":116801185,"node_id":"MDU6TGFiZWwxMTY4MDExODU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/documentation","name":"kind/documentation","color":"c7def8","default":false},{"id":778118403,"node_id":"MDU6TGFiZWw3NzgxMTg0MDM=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lifecycle/frozen","name":"lifecycle/frozen","color":"d3e2f0","default":false},{"id":114528273,"node_id":"MDU6TGFiZWwxMTQ1MjgyNzM=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/backlog","name":"priority/backlog","color":"fbca04","default":false},{"id":450823910,"node_id":"MDU6TGFiZWw0NTA4MjM5MTA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cli","name":"sig/cli","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2016-05-06T00:02:23Z","updated_at":"2018-06-05T02:40:36Z","closed_at":null,"author_association":"NONE","body":"I am seeing unexpected behavior from a user standpoint when `kubectl apply -f mydeployment.yml`\n\nThe existing Deployment has an HPA associated with it and the current replica count is 3. When the deployment is accepted, the number of replicas jumps to 9, then scales down to 6, the value in the deployment. Eventually, the new pods info starts flowing in and the HPA does its thing and scales back to satisfaction.\n\nThe behavior I expected is that the rollout would use the current replicas from the HPA and the strategy parameters from the Deployment to keep replica count in line with the current target set by the HPA. \n\nk8s version: 1.2.3\n\n```\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  name: mydeployment\nspec:\n  replicas: 6\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxUnavailable: \"40%\"\n      maxSurge: \"50%\"\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n        - name: myapp\n          image: \"someimage\"\n```\n\n```\napiVersion: extensions/v1beta1\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: mydeployment\n  namespace: default\nspec:\n  scaleRef:\n    kind: Deployment\n    name: mydeployment\n    subresource: scale\n  minReplicas: 3\n  maxReplicas: 12\n  cpuUtilization:\n    targetPercentage: 50\n```\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/394562777","html_url":"https://github.com/kubernetes/kubernetes/issues/25238#issuecomment-394562777","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25238","id":394562777,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDU2Mjc3Nw==","user":{"login":"apelisse","id":1929644,"node_id":"MDQ6VXNlcjE5Mjk2NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1929644?v=4","gravatar_id":"","url":"https://api.github.com/users/apelisse","html_url":"https://github.com/apelisse","followers_url":"https://api.github.com/users/apelisse/followers","following_url":"https://api.github.com/users/apelisse/following{/other_user}","gists_url":"https://api.github.com/users/apelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/apelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apelisse/subscriptions","organizations_url":"https://api.github.com/users/apelisse/orgs","repos_url":"https://api.github.com/users/apelisse/repos","events_url":"https://api.github.com/users/apelisse/events{/privacy}","received_events_url":"https://api.github.com/users/apelisse/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T02:40:36Z","updated_at":"2018-06-05T02:40:36Z","author_association":"MEMBER","body":"Yeah, we intend to not re-default after creation (discussion to be finalized). My opinion (and it seems to be confirmed by this issue) is that people remove fields because they don't want to manage them, not because they want the default value (they should specify the default value if that's what they want). Obviously, elements of a map/list are different, and IMO, should be removed when the creator drops them."}}
{"actor":{"display_login":"apelisse"}}