{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/charts/pulls/comments/85782857","pull_request_review_id":6460252,"id":85782857,"diff_hunk":"@@ -0,0 +1,184 @@\n+# CockroachDB Helm Chart\n+\n+## Prerequisites Details\n+* Kubernetes 1.4 with alpha APIs enabled\n+* PV support on the underlying infrastructure\n+\n+## PetSet Details\n+* http://kubernetes.io/docs/user-guide/petset/\n+\n+## PetSet Caveats\n+* http://kubernetes.io/docs/user-guide/petset/#alpha-limitations\n+\n+## Todo\n+* Support setting up clusters with certificate-based authentication\n+\n+## Chart Details\n+This chart will do the following:\n+\n+* Set up a dynamically scalable CockroachDB cluster using a Kubernetes PetSet\n+\n+## Installing the Chart\n+\n+To install the chart with the release name `my-release`:\n+\n+```console\n+$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator\n+$ helm install --name my-release incubator/cockroachdb\n+```\n+\n+## Configuration\n+\n+The following tables lists the configurable parameters of the CockroachDB chart and their default values.\n+\n+| Parameter               | Description                        | Default                                                    |\n+| ----------------------- | ---------------------------------- | ---------------------------------------------------------- |\n+| `Name`                  | Chart name                         | `cockroachdb`                                              |\n+| `Image`                 | Container image name               | `cockroachdb/cockroach`                                    |\n+| `ImageTag`              | Container image tag                | `latest`                                                    |\n+| `ImagePullPolicy`       | Container pull policy              | `Always`                                                   |\n+| `Replicas`              | k8s petset replicas                | `3`                                                        |\n+| `Component`             | k8s selector key                   | `cockroachdb`                                              |\n+| `GrpcPort`              | CockroachDB primary serving port   | `26257`                                                     |\n+| `HttpPort`              | CockroachDB HTTP port              | `8080`                                                     |\n+| `Cpu`                   | Container requested cpu            | `100m`                                                     |\n+| `Memory`                | Container requested memory         | `512Mi`                                                    |\n+| `Storage`               | Persistent volume size             | `1Gi`                                                      |\n+| `StorageClass`          | Persistent volume class            | `anything`                                                      |\n+\n+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.\n+\n+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,\n+\n+```console\n+$ helm install --name my-release -f values.yaml incubator/cockroachdb\n+```\n+\n+> **Tip**: You can use the default [values.yaml](values.yaml)\n+\n+# Deep dive\n+\n+## Connecting to the CockroachDB cluster\n+\n+Once you've created the cluster, you can start talking to it it by connecting\n+to its \"public\" service. CockroachDB is PostgreSQL wire protocol compatible so\n+there's a [wide variety of supported\n+clients](https://www.cockroachlabs.com/docs/install-client-drivers.html). For\n+the sake of example, we'll open up a SQL shell using CockroachDB's built-in\n+shell and play around with it a bit, like this (likely needing to replace\n+\"my-release-cockroachdb-public\" with the name of the \"-public\" service that\n+was created with your installed chart):\n+\n+```console\n+$ kubectl run -it --rm cockroach-client \\\n+    --image=cockroachdb/cockroach \\\n+    --restart=Never \\\n+    --command -- ./cockroach sql --host my-release-cockroachdb-public\n+Waiting for pod default/cockroach-client to be running, status is Pending,\n+pod ready: false\n+If you don't see a command prompt, try pressing enter.\n+root@my-release-cockroachdb-public:26257> SHOW DATABASES;\n++--------------------+\n+|      Database      |\n++--------------------+\n+| information_schema |\n+| pg_catalog         |\n+| system             |\n++--------------------+\n+(3 rows)\n+root@my-release-cockroachdb-public:26257> CREATE DATABASE bank;\n+CREATE DATABASE\n+root@my-release-cockroachdb-public:26257> CREATE TABLE bank.accounts (id INT\n+PRIMARY KEY, balance DECIMAL);\n+CREATE TABLE\n+root@my-release-cockroachdb-public:26257> INSERT INTO bank.accounts VALUES\n+(1234, 10000.50);\n+INSERT 1\n+root@my-release-cockroachdb-public:26257> SELECT * FROM bank.accounts;\n++------+---------+\n+|  id  | balance |\n++------+---------+\n+| 1234 | 10000.5 |\n++------+---------+\n+(1 row)\n+root@my-release-cockroachdb-public:26257> \\q\n+Waiting for pod default/cockroach-client to terminate, status is Running\n+pod \"cockroach-client\" deleted\n+```\n+\n+## Cluster health\n+\n+Because our pod spec includes regular health checks of the CockroachDB processes,\n+simply running `kubectl get pods` and looking at the `STATUS` column is sufficient\n+to determine the health of each instance in the cluster.\n+\n+If you want more detailed information about the cluster, the best place to look\n+is the admin UI.\n+\n+## Accessing the admin UI\n+\n+If you want to see information about how the cluster is doing, you can try\n+pulling up the CockroachDB admin UI by port-forwarding from your local machine\n+to one of the pods (replacing \"release-cockroachdb-0\" with one of your pods' names):\n+\n+```shell\n+kubectl port-forward release-cockroachdb-0 8080\n+```\n+\n+Once you’ve done that, you should be able to access the admin UI by visiting\n+http://localhost:8080/ in your web browser.\n+\n+## Failover\n+\n+If any CockroachDB member fails it gets restarted or recreated automatically by\n+the Kubernetes infrastructure, and will rejoin the cluster automatically when\n+it comes back up. You can test this scenario by killing any of the pets:\n+\n+```shell\n+kubectl delete pod my-release-cockroachdb-1\n+```\n+\n+```shell\n+$ kubectl get pods -l \"component=my-release-cockroachdb\"\n+NAME                      READY     STATUS        RESTARTS   AGE\n+my-release-cockroachdb-0  1/1       Running       0          5m\n+my-release-cockroachdb-2  1/1       Running       0          5m\n+```\n+\n+After a while:\n+\n+```console\n+$ kubectl get pods -l \"component=my-release-cockroachdb\"\n+NAME                      READY     STATUS        RESTARTS   AGE\n+my-release-cockroachdb-0  1/1       Running       0          5m\n+my-release-cockroachdb-1  1/1       Running       0          20s\n+my-release-cockroachdb-2  1/1       Running       0          5m\n+```\n+\n+You can check state of re-joining from the new pod's logs:\n+\n+```console\n+$ kubectl logs my-release-cockroachdb-1\n+[...]\n+I161028 19:32:09.754026 1 server/node.go:586  [n1] node connected via gossip and\n+verified as part of cluster {\"35ecbc27-3f67-4e7d-9b8f-27c31aae17d6\"}\n+[...]\n+cockroachdb-0.my-release-cockroachdb.default.svc.cluster.local:26257\n+build:      beta-20161027-55-gd2d3c7f @ 2016/10/28 19:27:25 (go1.7.3)\n+admin:      http://0.0.0.0:8080\n+sql:\n+postgresql://root@my-release-cockroachdb-1.my-release-cockroachdb.default.svc.cluster.local:26257?sslmode=disable\n+logs:       cockroach-data/logs\n+store[0]:   path=cockroach-data\n+status:     restarted pre-existing node\n+clusterID:  {35ecbc27-3f67-4e7d-9b8f-27c31aae17d6}\n+nodeID:     2\n+[...]\n+```\n+\n+## Scaling\n+\n+Scaling should typically be managed via the `helm upgrade` command, but if","path":"incubator/cockroachdb/README.md","position":null,"original_position":181,"commit_id":"40f2cd6146ca625f05f36be249661f6e043ae332","original_commit_id":"e81d883954813ec56232bc82d1859bc09fb05c13","user":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"body":"It does not work yet, good catch. It just gives the error:\r\n\r\n```\r\nError: UPGRADE FAILED: PetSet.apps \"gangly-ant-cockroachdb\" is invalid: spec: Forbidden: updates to petset spec for fields other than 'replicas' are forbidden.\r\n```\r\n\r\nAdded a little blurb about using kubectl patch.","created_at":"2016-10-31T16:55:54Z","updated_at":"2016-10-31T17:02:10Z","html_url":"https://github.com/kubernetes/charts/pull/167#discussion_r85782857","pull_request_url":"https://api.github.com/repos/kubernetes/charts/pulls/167","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/charts/pulls/comments/85782857"},"html":{"href":"https://github.com/kubernetes/charts/pull/167#discussion_r85782857"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/charts/pulls/167"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/charts/pulls/167","id":91440908,"html_url":"https://github.com/kubernetes/charts/pull/167","diff_url":"https://github.com/kubernetes/charts/pull/167.diff","patch_url":"https://github.com/kubernetes/charts/pull/167.patch","issue_url":"https://api.github.com/repos/kubernetes/charts/issues/167","number":167,"state":"open","locked":false,"title":"Add a chart for CockroachDB to the incubator repo","user":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"body":"The only question that I ran into during the process is how to get the NOTES.txt info to print when the chart is installed. Does that only happen when installed via a remote repo rather than when installing from a local directory?\n\n@viglesiasce @tschottdorf @jseldess\n","created_at":"2016-10-28T19:48:45Z","updated_at":"2016-10-31T17:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1fb0482a1ff58a5670f345ac4e54cf84fbdce0b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/charts/pulls/167/commits","review_comments_url":"https://api.github.com/repos/kubernetes/charts/pulls/167/comments","review_comment_url":"https://api.github.com/repos/kubernetes/charts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/charts/issues/167/comments","statuses_url":"https://api.github.com/repos/kubernetes/charts/statuses/40f2cd6146ca625f05f36be249661f6e043ae332","head":{"label":"a-robinson:cdb","ref":"cdb","sha":"40f2cd6146ca625f05f36be249661f6e043ae332","user":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"repo":{"id":71575775,"name":"charts","full_name":"a-robinson/charts","owner":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a-robinson/charts","description":"Curated applications for Kubernetes using Helm charts with integrated Deployment Manager templates","fork":true,"url":"https://api.github.com/repos/a-robinson/charts","forks_url":"https://api.github.com/repos/a-robinson/charts/forks","keys_url":"https://api.github.com/repos/a-robinson/charts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a-robinson/charts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a-robinson/charts/teams","hooks_url":"https://api.github.com/repos/a-robinson/charts/hooks","issue_events_url":"https://api.github.com/repos/a-robinson/charts/issues/events{/number}","events_url":"https://api.github.com/repos/a-robinson/charts/events","assignees_url":"https://api.github.com/repos/a-robinson/charts/assignees{/user}","branches_url":"https://api.github.com/repos/a-robinson/charts/branches{/branch}","tags_url":"https://api.github.com/repos/a-robinson/charts/tags","blobs_url":"https://api.github.com/repos/a-robinson/charts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a-robinson/charts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a-robinson/charts/git/refs{/sha}","trees_url":"https://api.github.com/repos/a-robinson/charts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a-robinson/charts/statuses/{sha}","languages_url":"https://api.github.com/repos/a-robinson/charts/languages","stargazers_url":"https://api.github.com/repos/a-robinson/charts/stargazers","contributors_url":"https://api.github.com/repos/a-robinson/charts/contributors","subscribers_url":"https://api.github.com/repos/a-robinson/charts/subscribers","subscription_url":"https://api.github.com/repos/a-robinson/charts/subscription","commits_url":"https://api.github.com/repos/a-robinson/charts/commits{/sha}","git_commits_url":"https://api.github.com/repos/a-robinson/charts/git/commits{/sha}","comments_url":"https://api.github.com/repos/a-robinson/charts/comments{/number}","issue_comment_url":"https://api.github.com/repos/a-robinson/charts/issues/comments{/number}","contents_url":"https://api.github.com/repos/a-robinson/charts/contents/{+path}","compare_url":"https://api.github.com/repos/a-robinson/charts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a-robinson/charts/merges","archive_url":"https://api.github.com/repos/a-robinson/charts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a-robinson/charts/downloads","issues_url":"https://api.github.com/repos/a-robinson/charts/issues{/number}","pulls_url":"https://api.github.com/repos/a-robinson/charts/pulls{/number}","milestones_url":"https://api.github.com/repos/a-robinson/charts/milestones{/number}","notifications_url":"https://api.github.com/repos/a-robinson/charts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a-robinson/charts/labels{/name}","releases_url":"https://api.github.com/repos/a-robinson/charts/releases{/id}","deployments_url":"https://api.github.com/repos/a-robinson/charts/deployments","created_at":"2016-10-21T15:05:27Z","updated_at":"2016-10-21T15:05:28Z","pushed_at":"2016-10-31T17:02:06Z","git_url":"git://github.com/a-robinson/charts.git","ssh_url":"git@github.com:a-robinson/charts.git","clone_url":"https://github.com/a-robinson/charts.git","svn_url":"https://github.com/a-robinson/charts","homepage":"","size":292,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"1c6a163dad6360943c5575fffcf42f92f4a43a6b","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":46806184,"name":"charts","full_name":"kubernetes/charts","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/charts","description":"Curated applications for Kubernetes using Helm charts with integrated Deployment Manager templates","fork":false,"url":"https://api.github.com/repos/kubernetes/charts","forks_url":"https://api.github.com/repos/kubernetes/charts/forks","keys_url":"https://api.github.com/repos/kubernetes/charts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/charts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/charts/teams","hooks_url":"https://api.github.com/repos/kubernetes/charts/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/charts/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/charts/events","assignees_url":"https://api.github.com/repos/kubernetes/charts/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/charts/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/charts/tags","blobs_url":"https://api.github.com/repos/kubernetes/charts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/charts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/charts/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/charts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/charts/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/charts/languages","stargazers_url":"https://api.github.com/repos/kubernetes/charts/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/charts/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/charts/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/charts/subscription","commits_url":"https://api.github.com/repos/kubernetes/charts/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/charts/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/charts/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/charts/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/charts/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/charts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/charts/merges","archive_url":"https://api.github.com/repos/kubernetes/charts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/charts/downloads","issues_url":"https://api.github.com/repos/kubernetes/charts/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/charts/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/charts/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/charts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/charts/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/charts/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/charts/deployments","created_at":"2015-11-24T17:05:28Z","updated_at":"2016-10-28T23:56:47Z","pushed_at":"2016-10-31T17:02:06Z","git_url":"git://github.com/kubernetes/charts.git","ssh_url":"git@github.com:kubernetes/charts.git","clone_url":"https://github.com/kubernetes/charts.git","svn_url":"https://github.com/kubernetes/charts","homepage":"","size":734,"stargazers_count":110,"watchers_count":110,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":35,"forks":74,"open_issues":35,"watchers":110,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/charts/pulls/167"},"html":{"href":"https://github.com/kubernetes/charts/pull/167"},"issue":{"href":"https://api.github.com/repos/kubernetes/charts/issues/167"},"comments":{"href":"https://api.github.com/repos/kubernetes/charts/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/charts/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/charts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/charts/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/charts/statuses/40f2cd6146ca625f05f36be249661f6e043ae332"}}}}
{"actor":{"display_login":"a-robinson"}}