{"action":"closed","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/12817","repository_url":"https://api.github.com/repos/rancher/rancher","labels_url":"https://api.github.com/repos/rancher/rancher/issues/12817/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/12817/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/12817/events","html_url":"https://github.com/rancher/rancher/issues/12817","id":315366677,"number":12817,"title":"Deployment with InitContainer(sidecar) unable to scale","user":{"login":"gwiersma","id":10595726,"avatar_url":"https://avatars1.githubusercontent.com/u/10595726?v=4","gravatar_id":"","url":"https://api.github.com/users/gwiersma","html_url":"https://github.com/gwiersma","followers_url":"https://api.github.com/users/gwiersma/followers","following_url":"https://api.github.com/users/gwiersma/following{/other_user}","gists_url":"https://api.github.com/users/gwiersma/gists{/gist_id}","starred_url":"https://api.github.com/users/gwiersma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwiersma/subscriptions","organizations_url":"https://api.github.com/users/gwiersma/orgs","repos_url":"https://api.github.com/users/gwiersma/repos","events_url":"https://api.github.com/users/gwiersma/events{/privacy}","received_events_url":"https://api.github.com/users/gwiersma/received_events","type":"User","site_admin":false},"labels":[{"id":203010811,"url":"https://api.github.com/repos/rancher/rancher/labels/area/service","name":"area/service","color":"FBCA04","default":false},{"id":145695744,"url":"https://api.github.com/repos/rancher/rancher/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":343947968,"url":"https://api.github.com/repos/rancher/rancher/labels/priority/0","name":"priority/0","color":"009800","default":false},{"id":203009589,"url":"https://api.github.com/repos/rancher/rancher/labels/status/to-test","name":"status/to-test","color":"66aa66","default":false},{"id":659821934,"url":"https://api.github.com/repos/rancher/rancher/labels/version/2.0","name":"version/2.0","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":{"login":"sangeethah","id":4266958,"avatar_url":"https://avatars0.githubusercontent.com/u/4266958?v=4","gravatar_id":"","url":"https://api.github.com/users/sangeethah","html_url":"https://github.com/sangeethah","followers_url":"https://api.github.com/users/sangeethah/followers","following_url":"https://api.github.com/users/sangeethah/following{/other_user}","gists_url":"https://api.github.com/users/sangeethah/gists{/gist_id}","starred_url":"https://api.github.com/users/sangeethah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangeethah/subscriptions","organizations_url":"https://api.github.com/users/sangeethah/orgs","repos_url":"https://api.github.com/users/sangeethah/repos","events_url":"https://api.github.com/users/sangeethah/events{/privacy}","received_events_url":"https://api.github.com/users/sangeethah/received_events","type":"User","site_admin":false},"assignees":[{"login":"sangeethah","id":4266958,"avatar_url":"https://avatars0.githubusercontent.com/u/4266958?v=4","gravatar_id":"","url":"https://api.github.com/users/sangeethah","html_url":"https://github.com/sangeethah","followers_url":"https://api.github.com/users/sangeethah/followers","following_url":"https://api.github.com/users/sangeethah/following{/other_user}","gists_url":"https://api.github.com/users/sangeethah/gists{/gist_id}","starred_url":"https://api.github.com/users/sangeethah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangeethah/subscriptions","organizations_url":"https://api.github.com/users/sangeethah/orgs","repos_url":"https://api.github.com/users/sangeethah/repos","events_url":"https://api.github.com/users/sangeethah/events{/privacy}","received_events_url":"https://api.github.com/users/sangeethah/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/rancher/rancher/milestones/126","html_url":"https://github.com/rancher/rancher/milestone/126","labels_url":"https://api.github.com/repos/rancher/rancher/milestones/126/labels","id":3297345,"number":126,"title":"v2.0.1","description":"","creator":{"login":"deniseschannon","id":11410997,"avatar_url":"https://avatars1.githubusercontent.com/u/11410997?v=4","gravatar_id":"","url":"https://api.github.com/users/deniseschannon","html_url":"https://github.com/deniseschannon","followers_url":"https://api.github.com/users/deniseschannon/followers","following_url":"https://api.github.com/users/deniseschannon/following{/other_user}","gists_url":"https://api.github.com/users/deniseschannon/gists{/gist_id}","starred_url":"https://api.github.com/users/deniseschannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniseschannon/subscriptions","organizations_url":"https://api.github.com/users/deniseschannon/orgs","repos_url":"https://api.github.com/users/deniseschannon/repos","events_url":"https://api.github.com/users/deniseschannon/events{/privacy}","received_events_url":"https://api.github.com/users/deniseschannon/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":88,"state":"open","created_at":"2018-04-25T20:10:07Z","updated_at":"2018-05-17T22:12:36Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-04-18T07:44:39Z","updated_at":"2018-05-17T22:12:36Z","closed_at":"2018-05-17T22:12:35Z","author_association":"NONE","body":"Rancher versions:\r\nrancher/server: v2.0.0-beta3\r\nrancher/agent: agent:v2.0.0-beta3\r\n\r\nDocker version:\r\nServer Version: 17.03.2-ce\r\n\r\nOperating system and kernel:\r\nUbuntu 16.04.4 LTS (Xenial Xerus)\"\r\n4.13.0-38-generic\r\n\r\nType/provider of hosts:\r\nVMware vSphere\r\n\r\nSetup details:\r\n1 master\r\n3 workers\r\n\r\nSteps to Reproduce:\r\n- Start deployment with kubectl create -f <file.yaml>\r\n- Init container is started and downloads a file from een internal webserver.\r\n- Downloaded file is saved as a .php file on a shared volume.\r\n- When the file has been downloaded, a hello world container is started.\r\n- The hello world container uses the same volume as the initcontainer and also uses the index.php as default webpage.\r\n- When we try to scale the amount of replicas, we receive the following error in the Rancher2.0 Dashboard: \r\n\r\n```\r\nError updating scale\r\nValidation failed in API: Deployment.apps \"helloworld\" is invalid: spec.template.spec.initContainers[0].lifecycle: Invalid value: api.Lifecycle{PostStart:(*api.Handler)(nil), PreStop:(*api.Handler)(nil)}: must not be set for init containers\r\n```\r\n\r\nWhen we use kubectl: rancher kubectl scale --replicas=<amount> -f <yamlfile>.yaml it works. \r\n\r\nOur Deployment file:\r\n\r\n```\r\napiVersion: extensions/v1beta1\r\nkind: Deployment\r\nmetadata:\r\n  name: \"helloworld\"\r\nspec:\r\n  replicas: 1\r\n  selector:\r\n    matchLabels:\r\n      app: \"helloworld\"\r\n\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: \"helloworld\"\r\n\r\n    spec:\r\n      volumes:\r\n        - name: \"application\"\r\n          hostPath:\r\n            path: /var/kube/workdir/\r\n            type: DirectoryOrCreate\r\n      initContainers:\r\n      - name: check-webapp-ready\r\n        image: busybox\r\n        command: [\"wget\", \"-O\", \"/www/index.php\", \"http://<IP>/index.txt\"]\r\n        volumeMounts:\r\n          - name: \"application\"\r\n            mountPath: \"/www\"\r\n      containers:\r\n      - name: webserver\r\n        image: \"dockercloud/hello-world:latest\"\r\n        ports:\r\n        - name: http\r\n          containerPort: 80\r\n        volumeMounts:\r\n          - name: \"application\"\r\n            mountPath: \"/www\"\r\n```\r\n"}}
{"actor":{"display_login":"deniseschannon"}}