{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/45573160","id":45573160,"diff_hunk":"@@ -0,0 +1,123 @@\n+<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->\n+\n+<!-- BEGIN STRIP_FOR_RELEASE -->\n+\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+\n+<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>\n+\n+If you are using a released version of Kubernetes, you should\n+refer to the docs that go with that version.\n+\n+<strong>\n+The latest release of this document can be found\n+[here](http://releases.k8s.io/release-1.1/docs/proposals/service-catalog.md).\n+\n+Documentation for other releases can be found at\n+[releases.k8s.io](http://releases.k8s.io).\n+</strong>\n+--\n+\n+<!-- END STRIP_FOR_RELEASE -->\n+\n+<!-- END MUNGE: UNVERSIONED_WARNING -->\n+\n+# Service Catalog\n+\n+## Abstract\n+\n+Kubernetes has Services but they are scoped per namespace, and (assuming eventual support for RBAC) you may not want everyone to be able to see and use all the services in your namespace.\n+\n+\n+This proposal is about:\n+\n+- associating additional configuration/secret data with Services\n+- adding a new Service Catalog resource into which users can publish services that others can easily find and consume\n+- adding support for dynamic provisioning of resources from the catalog\n+- making it easier to link Services (and their configuration data) to Pods\n+\n+## Service configuration data\n+\n+The only data currently associated with a service is a list of zero or more endpoints. Many services also have configuration data associated with them. These include things such as logins, passwords, and additional connection parameters. To tie configuration data to a service, we propose adding information to the Service type to be able to express a relationship between the Service and its relevant configuration data. This could be accomplished by adding new field(s) or by using annotations. Potential configuration data target reference types include Secrets and ConfigData.\n+\n+Just creating the reference association by itself does not accomplish much; to be useful, that data needs to be available to the processes executing in containers. More on this process is below in the sections on service claims and linking.\n+\n+## Service catalogs\n+\n+A service catalog is a listing of \"services\". Examples might include an external database that is deployed outside of the cluster, an actual Kubernetes Service, a template of cluster primitives to be created, and custom provisioners that can perform tasks such as creating users in external systems.\n+\n+The catalog is not meant to include every service in the cluster. Instead, it should contain those services that users with to highlight and make available to other users. For example, your namespace might contain \"etcd\", \"etcd-discovery\", and \"postgresql\" services, and the only one you want to share with others is the postgresql service.\n+\n+### Publishing to a catalog\n+\n+Users should be able to publish entries to a service catalog. One means of accomplishing could be by adding annotations to the resources that can go into a catalog (e.g, Services). Another option would be to create `ServiceCatalogEntry` resources that reference the appropriate resources.\n+\n+An entry in the service catalog has a \"type\", which indicates the behavior that occurs when it is claimed by a user. We have thought of the following potential types:\n+\n+- reference: \"I want to use this entry as-is, including its configuration data\"\n+- template: \"I want to create items from the specified template\"\n+- provision: \"I want the creation to be goverened by some other entity that implements the 'service broker' HTTP interface\"\n+\n+We see the type as an arbitrary `string`; one or more controllers could run to process each claim type, performing whatever logic is appropriate to fulfill the specific type in question.\n+\n+### Viewing a catalog\n+\n+Users should be able to list the entries in a service catalog. Users should be able to select an entry and \"consume\" it. We call this consumption \"claiming\" a service from a service catalog.\n+\n+### Claiming a service\n+\n+When you want to use an entry from the service catalog, you create a `ServiceClaim` that references the desired entry. A controller processes new claims for admission. This determines if the user who created the claim is allowed to consume the entry from the catalog. This decision can be flexible: it could be automated based on policy, or it could support manual intervention and workflow.\n+\n+Once the claim has been admitted, a controller performs the provisioning process based on the service catalog entry's type.\n+\n+For a reference claim, a new service is created in the user's namespace. The new service somehow needs to be a CNAME to the source. Additionally, for each configuration resource referenced by the source service, the controller creates a clone of it in the user's namespace.\n+\n+For a template claim, the template is processed and its items are created in the user's namespace (see [OpenShift templates](https://docs.openshift.org/latest/dev_guide/templates.html) for more details on templates).\n+\n+For a provision claim, the controller sends requests to the specified \"service broker\" endpoint to perform whatever provisioning actions the broker is coded to do.\n+\n+Additional fulfillment types are possible as long as there is a controller that is handling them.\n+\n+TODO poking holes in cluster firewall for cross-namespace connections\n+\n+## Linking services\n+\n+Claiming a service catalog entry only creates resources in the user's namespace. If all you need is a service and its DNS entry, this may be sufficient for your pods to function. But if you need the configuration data injected into your pod, it would be nice to make that easier to do.\n+\n+We want to add the ability to link a service to a deployable resource such as a Deployment. This could look something like:\n+\n+    kubectl link postgresql deployment/web\n+    service \"postgresql\" linked to deployemnt \"web\"\n+    configdata \"postgresql-options\" linked to deployment \"web\" as a volume\n+    secret \"postgresql-credentials\" linked to deployment \"web\" as a volume\n+\n+This command would automatically inject the ConfigData and Secret objects as volumes into the Deployment. This could be flexible as well, allowing you instead to expose these items as environment variables.","path":"docs/proposals/service-catalog.md","position":103,"original_position":103,"commit_id":"21cfd1bab8776f18d6761c49ca26b4bbc1e2e19d","original_commit_id":"21cfd1bab8776f18d6761c49ca26b4bbc1e2e19d","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"body":"Volumes in a Pod have names.  Under what name are these exposed?  Given that there are multiple ways to consume secrets and configs, I dislike the assumption that it should be a volume.  I also dislike the imperative nature of this.  Why is this not part of the declaration of a Deployment, at which point I can specify exactly how I want to consume associated objects?","created_at":"2015-11-23T05:18:27Z","updated_at":"2015-11-23T05:18:27Z","html_url":"https://github.com/kubernetes/kubernetes/pull/17543#discussion_r45573160","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/45573160"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/17543#discussion_r45573160"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543","id":51302728,"html_url":"https://github.com/kubernetes/kubernetes/pull/17543","diff_url":"https://github.com/kubernetes/kubernetes/pull/17543.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/17543.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17543","number":17543,"state":"open","locked":false,"title":"Add Service Catalog proposal","user":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"body":"This is a super rough proposal at a very high level about adding a Service Catalog, publishing services to it, consuming services from it, and linking services to things like deployments. Consuming a \"provision\"-able entry from a catalog would be like the Service Broker concept that Cloud Foundry provides.\r\n\r\nI'm mostly putting this out there to solicit feedback in the short term; I will update the proposal over the next few days as needed.\r\n\r\n@smarterclayton @bgrant0607 @kubernetes/rh-cluster-infra @bparees @pweil- @liggitt @deads2k ","created_at":"2015-11-20T00:32:58Z","updated_at":"2015-11-23T05:18:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f07e4cf6ff491f681e66ff8dc87b3d304e710a25","assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/17543/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/21cfd1bab8776f18d6761c49ca26b4bbc1e2e19d","head":{"label":"ncdc:service-catalog-proposal","ref":"service-catalog-proposal","sha":"21cfd1bab8776f18d6761c49ca26b4bbc1e2e19d","user":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"repo":{"id":22116483,"name":"kubernetes","full_name":"ncdc/kubernetes","owner":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ncdc/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/ncdc/kubernetes","forks_url":"https://api.github.com/repos/ncdc/kubernetes/forks","keys_url":"https://api.github.com/repos/ncdc/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ncdc/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ncdc/kubernetes/teams","hooks_url":"https://api.github.com/repos/ncdc/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ncdc/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ncdc/kubernetes/events","assignees_url":"https://api.github.com/repos/ncdc/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ncdc/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ncdc/kubernetes/tags","blobs_url":"https://api.github.com/repos/ncdc/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ncdc/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ncdc/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ncdc/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ncdc/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ncdc/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ncdc/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ncdc/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ncdc/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ncdc/kubernetes/subscription","commits_url":"https://api.github.com/repos/ncdc/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ncdc/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ncdc/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ncdc/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ncdc/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ncdc/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ncdc/kubernetes/merges","archive_url":"https://api.github.com/repos/ncdc/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ncdc/kubernetes/downloads","issues_url":"https://api.github.com/repos/ncdc/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ncdc/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ncdc/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ncdc/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ncdc/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ncdc/kubernetes/releases{/id}","created_at":"2014-07-22T18:49:30Z","updated_at":"2015-04-13T16:38:08Z","pushed_at":"2015-11-20T20:29:11Z","git_url":"git://github.com/ncdc/kubernetes.git","ssh_url":"git@github.com:ncdc/kubernetes.git","clone_url":"https://github.com/ncdc/kubernetes.git","svn_url":"https://github.com/ncdc/kubernetes","homepage":null,"size":134375,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"b12550273eec99828e4cc9a6d7a3be3b5adf67cb","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-11-23T01:56:37Z","pushed_at":"2015-11-23T05:01:51Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":289448,"stargazers_count":11378,"watchers_count":11378,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3022,"mirror_url":null,"open_issues_count":2387,"forks":3022,"open_issues":2387,"watchers":11378,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/17543"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/17543"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/17543/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/17543/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/21cfd1bab8776f18d6761c49ca26b4bbc1e2e19d"}}}}