{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3613","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3613/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3613/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3613/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/3613","id":54819327,"number":3613,"title":"Namespace as kind","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":[],"state":"open","locked":false,"assignee":{"login":"erictune","id":8105590,"avatar_url":"https://avatars.githubusercontent.com/u/8105590?v=3","gravatar_id":"","url":"https://api.github.com/users/erictune","html_url":"https://github.com/erictune","followers_url":"https://api.github.com/users/erictune/followers","following_url":"https://api.github.com/users/erictune/following{/other_user}","gists_url":"https://api.github.com/users/erictune/gists{/gist_id}","starred_url":"https://api.github.com/users/erictune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erictune/subscriptions","organizations_url":"https://api.github.com/users/erictune/orgs","repos_url":"https://api.github.com/users/erictune/repos","events_url":"https://api.github.com/users/erictune/events{/privacy}","received_events_url":"https://api.github.com/users/erictune/received_events","type":"User","site_admin":false},"milestone":null,"comments":23,"created_at":"2015-01-19T22:18:01Z","updated_at":"2015-01-28T15:24:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/3613","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/3613","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/3613.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/3613.patch"},"body":"A ```Namespace``` object is defined to support discovery and traversal of Kubernetes cluster.\r\n\r\n**Model changes:**\r\n\r\nA ```Namespace``` contains the following attributes:\r\n\r\n1. Name\r\n2. Labels\r\n3. Annotations\r\n\r\nA ```Namespace``` is not namespace scoped.\r\n\r\n**REST API**\r\n\r\nA ```Namespace``` operates like any other resource in Kubernetes, but it has a cluster-scope.\r\n\r\nAs a result, this PR modifies ```RESTStorage``` to state the scope of a resource (cluster or namespace).  This has an impact on how it associates a resource to its path.\r\n\r\n* Kubernetes creates a ```default``` namespace by default and ensures it exists.\r\n\r\nHTTP Semantics:\r\n\r\n| Action | HTTP Verb | Path | Description |\r\n| --- | --- | --- | --- |\r\n| CREATE | POST |  /api/{version}/ns/ | Create namespace |\r\n| GET | GET | /api/{version}/ns/{ns} | Get namespace {ns} |\r\n| UPDATE | PUT | /api/{version}/ns/{ns} | Update namespace {ns} |\r\n| DELETE | DELETE | /api/{version}/ns/{ns} | Delete namespace {ns} |\r\n| LIST | GET | /api/{version}/ns/ | List all namespaces |\r\n| WATCH | GET | /api/{version}/watch/ns/ | Watch all namespaces |\r\n\r\n**Data Storage**\r\n\r\nA ```Namespace``` object is not in a namespace, and is stored in a etcd key-space ```/registry/namespace/{name}``` to ensure uniqueness.\r\n\r\n**Client**\r\n```kubectl``` should support listing all namespaces if policy grants the action in the given namespace context.  **FUTURE PR**"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/71852456","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/3613#issuecomment-71852456","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3613","id":71852456,"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":"2015-01-28T15:24:14Z","updated_at":"2015-01-28T15:24:14Z","body":"There are some unique things about this PR that I want to investigate further.\r\n\r\nSpecifically:\r\n\r\n1. What is the impact of having a resource path (/ns) that is not a plural form of meta.Kind (Namespace)?\r\n2. Think through some on how kubectl will deal with the ramification of 1\r\n3. Look to see if Objects that are external to a Namespace should embed a different struct so RESTMapper can know to include namespace params in client requests."}}