{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24089","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24089/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24089/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24089/events","html_url":"https://github.com/kubernetes/kubernetes/issues/24089","id":147296372,"number":24089,"title":"kubectl validation fails when creating a non-v1 object in a v1 list","user":{"login":"ghodss","id":5209643,"avatar_url":"https://avatars.githubusercontent.com/u/5209643?v=3","gravatar_id":"","url":"https://api.github.com/users/ghodss","html_url":"https://github.com/ghodss","followers_url":"https://api.github.com/users/ghodss/followers","following_url":"https://api.github.com/users/ghodss/following{/other_user}","gists_url":"https://api.github.com/users/ghodss/gists{/gist_id}","starred_url":"https://api.github.com/users/ghodss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghodss/subscriptions","organizations_url":"https://api.github.com/users/ghodss/orgs","repos_url":"https://api.github.com/users/ghodss/repos","events_url":"https://api.github.com/users/ghodss/events{/privacy}","received_events_url":"https://api.github.com/users/ghodss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/component/kubectl","name":"component/kubectl","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/CSI-API%20Machinery%20SIG","name":"team/CSI-API Machinery SIG","color":"d2b48c"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/ux","name":"team/ux","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2016-04-11T02:27:16Z","updated_at":"2016-04-20T16:07:18Z","closed_at":null,"body":"In other words, you can't create/replace/delete/apply deployments with kubectl if they're in a list.\r\n\r\nWorks as expected:\r\n\r\n```console\r\n$ cat nginx-rc.yaml\r\napiVersion: v1\r\nkind: List\r\nitems:\r\n  - apiVersion: v1\r\n    kind: ReplicationController\r\n    metadata:\r\n      name: nginx\r\n    spec:\r\n      replicas: 1\r\n      template:\r\n        metadata:\r\n          labels:\r\n            name: nginx\r\n        spec:\r\n          containers:\r\n            - name: nginx\r\n              image: nginx\r\n$ kubectl create -f nginx-rc.yaml\r\nreplicationcontroller \"nginx\" created\r\n```\r\n\r\nDoes not work as expected:\r\n\r\n```\r\n$ cat nginx-dpl.yaml\r\napiVersion: v1\r\nkind: List\r\nitems:\r\n  - apiVersion: extensions/v1beta1\r\n    kind: Deployment\r\n    metadata:\r\n      name: nginx\r\n    spec:\r\n      replicas: 1\r\n      template:\r\n        metadata:\r\n          labels:\r\n            name: nginx\r\n        spec:\r\n          containers:\r\n            - name: nginx\r\n              image: nginx\r\n$ kubectl create -f nginx-dpl.yaml\r\nerror validating \"nginx-dpl.yaml\": error validating data: couldn't find type: v1beta1.Deployment; if you choose to ignore these errors, turn validation off with --validate=false\r\n$ kubectl create -f nginx-dpl.yaml --validate=false\r\ndeployment \"nginx\" created\r\n```\r\n\r\nThis is a high priority issue for us, since it means we can't (easily) use apply (or any kubectl command) with lists of JSON objects since we've moved all our replication controllers over to deployment objects, which is hampering the UX of our config efforts."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/212492311","html_url":"https://github.com/kubernetes/kubernetes/issues/24089#issuecomment-212492311","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24089","id":212492311,"user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T16:07:17Z","updated_at":"2016-04-20T16:07:17Z","body":"We need Lists to work - I think they're fundamental to stuff going forward\n(like templates, which are a variant of lists)\n\nOn Tue, Apr 19, 2016 at 10:58 PM, TonyAdo <notifications@github.com> wrote:\n\n> I agree with what @nikhiljindal <https://github.com/nikhiljindal>\n> suggested, we need to update SwaggerSchema to be able to create another\n> SwaggerSchema when handling list case.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/kubernetes/kubernetes/issues/24089#issuecomment-212226111>\n>\n"}}