{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/504","repository_url":"https://api.github.com/repos/kubernetes-sigs/kustomize","labels_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/504/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/504/comments","events_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/504/events","html_url":"https://github.com/kubernetes-sigs/kustomize/issues/504","id":373732496,"node_id":"MDU6SXNzdWUzNzM3MzI0OTY=","number":504,"title":"StatefulSet volumeclaimtemplates added when base did not include it","user":{"login":"msau42","id":24448061,"node_id":"MDQ6VXNlcjI0NDQ4MDYx","avatar_url":"https://avatars3.githubusercontent.com/u/24448061?v=4","gravatar_id":"","url":"https://api.github.com/users/msau42","html_url":"https://github.com/msau42","followers_url":"https://api.github.com/users/msau42/followers","following_url":"https://api.github.com/users/msau42/following{/other_user}","gists_url":"https://api.github.com/users/msau42/gists{/gist_id}","starred_url":"https://api.github.com/users/msau42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msau42/subscriptions","organizations_url":"https://api.github.com/users/msau42/orgs","repos_url":"https://api.github.com/users/msau42/repos","events_url":"https://api.github.com/users/msau42/events{/privacy}","received_events_url":"https://api.github.com/users/msau42/received_events","type":"User","site_admin":false},"labels":[{"id":952071125,"node_id":"MDU6TGFiZWw5NTIwNzExMjU=","url":"https://api.github.com/repos/kubernetes-sigs/kustomize/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-25T01:00:40Z","updated_at":"2018-10-31T01:20:02Z","closed_at":null,"author_association":"NONE","body":"This might be caused to https://github.com/kubernetes-sigs/kustomize/pull/483\r\n\r\nI have a StatefulSet spec that doesn't use volumeClaimTemplates, but when I kustomize it with common labels, it adds it to the spec, which causes it to fail validation:\r\n\r\nMy base spec:\r\n```\r\nkind: StatefulSet\r\napiVersion: apps/v1\r\nmetadata:\r\n  name: test\r\nspec:\r\n  serviceName: \"test\"\r\n  replicas: 1\r\n  selector:\r\n    matchLabels:\r\n      app: test\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: test\r\n    spec:\r\n      containers:\r\n        - name: nginx\r\n          image: nginx\r\n```\r\n\r\nAfter kustomize:\r\n```\r\nkind: StatefulSet\r\napiVersion: apps/v1\r\nmetadata:\r\n  name: test\r\nspec:\r\n  serviceName: \"test\"\r\n  replicas: 1\r\n  selector:\r\n    matchLabels:\r\n      app: test\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: test\r\n    spec:\r\n      containers:\r\n        - name: nginx\r\n          image: nginx\r\n  volumeClaimTemplates:\r\n    metadata:\r\n      labels:\r\n        app: my-label\r\n```\r\n\r\nError:\r\n```\r\nerror validating data: ValidationError(StatefulSet.spec.volumeClaimTemplates): invalid type for io.k8s.api.apps.v1.StatefulSetSpec.volumeClaimTemplates: got \"map\", expected \"array\"; if you choose to ignore these errors, turn validation off with --validate=false\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/comments/434527525","html_url":"https://github.com/kubernetes-sigs/kustomize/issues/504#issuecomment-434527525","issue_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/504","id":434527525,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDUyNzUyNQ==","user":{"login":"robbyt","id":58051,"node_id":"MDQ6VXNlcjU4MDUx","avatar_url":"https://avatars3.githubusercontent.com/u/58051?v=4","gravatar_id":"","url":"https://api.github.com/users/robbyt","html_url":"https://github.com/robbyt","followers_url":"https://api.github.com/users/robbyt/followers","following_url":"https://api.github.com/users/robbyt/following{/other_user}","gists_url":"https://api.github.com/users/robbyt/gists{/gist_id}","starred_url":"https://api.github.com/users/robbyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbyt/subscriptions","organizations_url":"https://api.github.com/users/robbyt/orgs","repos_url":"https://api.github.com/users/robbyt/repos","events_url":"https://api.github.com/users/robbyt/events{/privacy}","received_events_url":"https://api.github.com/users/robbyt/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T01:20:02Z","updated_at":"2018-10-31T01:20:02Z","author_association":"NONE","body":"@Liujingfang1 Thank you for the workaround. I also have this same issue, after upgrading to release 1.0.9."}}
{"actor":{"display_login":"robbyt"}}