@@ -34,7 +34,7 @@ This directory contains diagrams for the clustering design doc.
This depends on the `seqdiag`[utility](http://blockdiag.com/en/seqdiag/index.html). Assuming you have a non-borked python install, this should be installable with
```bash
```sh
pip install seqdiag
```
...
...
@@ -44,7 +44,7 @@ Just call `make` to regenerate the diagrams.
If you are on a Mac or your pip install is messed up, you can easily build with docker.
@@ -127,7 +127,7 @@ Events that communicate the state of a mounted volume are left to the volume plu
An administrator provisions storage by posting PVs to the API. Various way to automate this task can be scripted. Dynamic provisioning is a future feature that can maintain levels of PVs.
The ```PersistentVolumeClaimBinder``` attempts to find an available volume that most closely matches the user's request. If one exists, they are bound by putting a reference on the PV to the PVC. Requests can go unfulfilled if a suitable match is not found.
```
kubectl get pv
```console
$ kubectl get pv
NAME LABELS CAPACITY ACCESSMODES STATUS CLAIM REASON
@@ -208,7 +201,7 @@ The claim holder can use their claim as a volume. The ```PersistentVolumeClaimV
The claim holder owns the claim and its data for as long as the claim exists. The pod using the claim can be deleted, but the claim remains in the user's namespace. It can be used again and again by many pods.
```
```yaml
POST:
kind:Pod
...
...
@@ -229,17 +222,14 @@ spec:
accessMode:ReadWriteOnce
claimRef:
name:myclaim-1
```
#### Releasing a claim and Recycling a volume
When a claim holder is finished with their data, they can delete their claim.
```
kubectl delete pvc myclaim-1
```console
$ kubectl delete pvc myclaim-1
```
The ```PersistentVolumeClaimBinder``` will reconcile this by removing the claim reference from the PV and change the PVs status to 'Released'.
@@ -195,7 +196,7 @@ Because resource usage and related metrics change continuously, need to be track
Singleton values for observed and predicted future usage will rapidly prove inadequate, so we will support the following structure for extended usage information:
```
```yaml
resourceStatus:[
usage:[cpu:<CPU-info>,memory:<memory-info>],
maxusage:[cpu:<CPU-info>,memory:<memory-info>],
...
...
@@ -205,7 +206,7 @@ resourceStatus: [
where a `<CPU-info>` or `<memory-info>` structure looks like this:
```
```yaml
{
mean:<value># arithmetic mean
max:<value># minimum value
...
...
@@ -218,7 +219,7 @@ where a `<CPU-info>` or `<memory-info>` structure looks like this:
"99.9":<99.9th-percentile-value>,
...
]
}
}
```
All parts of this structure are optional, although we strongly encourage including quantities for 50, 90, 95, 99, 99.5, and 99.9 percentiles. _[In practice, it will be important to include additional info such as the length of the time window over which the averages are calculated, the confidence level, and information-quality metrics such as the number of dropped or discarded data points.]_
[vagrant@kubernetes-minion-1] $sudo systemctl status kubelet
...
...
@@ -135,7 +135,7 @@ Once your Vagrant machines are up and provisioned, the first thing to do is to c
You may need to build the binaries first, you can do this with `make`
```sh
```console
$ ./cluster/kubectl.sh get nodes
NAME LABELS STATUS
...
...
@@ -182,8 +182,8 @@ Interact with the cluster
When using the vagrant provider in Kubernetes, the `cluster/kubectl.sh` script will cache your credentials in a `~/.kubernetes_vagrant_auth` file so you will not be prompted for them in the future.
@@ -58,40 +58,40 @@ Below, we outline one of the more common git workflows that core developers use.
The commands below require that you have $GOPATH set ([$GOPATH docs](https://golang.org/doc/code.html#GOPATH)). We highly recommend you put kubernetes' code into your GOPATH. Note: the commands below will not work if there is more than one directory in your `$GOPATH`.
Note: If you have write access to the main repository at github.com/GoogleCloudPlatform/kubernetes, you should modify your git configuration so that you can't accidentally push to upstream:
```
```sh
git remote set-url --push upstream no_push
```
### Commiting changes to your fork
```
$ git commit
$ git push -f origin myfeature
```sh
git commit
git push -f origin myfeature
```
### Creating a pull request
...
...
@@ -114,7 +114,7 @@ directly from mercurial.
2) Create a new GOPATH for your tools and install godep:
```
```sh
export GOPATH=$HOME/go-tools
mkdir-p$GOPATH
go get github.com/tools/godep
...
...
@@ -122,7 +122,7 @@ go get github.com/tools/godep
3) Add $GOPATH/bin to your path. Typically you'd add this to your ~/.profile:
```
```sh
export GOPATH=$HOME/go-tools
export PATH=$PATH:$GOPATH/bin
```
...
...
@@ -133,7 +133,7 @@ Here's a quick walkthrough of one way to use godeps to add or update a Kubernete
@@ -185,28 +185,28 @@ Please send dependency updates in separate commits within your PR, for easier re
Before committing any changes, please link/copy these hooks into your .git
directory. This will keep you from accidentally committing non-gofmt'd go code.
```
```sh
cd kubernetes/.git/hooks/
ln-s ../../hooks/pre-commit .
```
## Unit tests
```
```sh
cd kubernetes
hack/test-go.sh
```
Alternatively, you could also run:
```
```sh
cd kubernetes
godep go test ./...
```
If you only want to run unit tests in one package, you could run ``godep go test`` under the package directory. For example, the following commands will run all unit tests in package kubelet:
```
```console
$cd kubernetes # step into kubernetes' directory.
$cd pkg/kubelet
$ godep go test
...
...
@@ -221,7 +221,7 @@ Currently, collecting coverage is only supported for the Go unit tests.
To run all unit tests and generate an HTML coverage report, run the following:
```
```sh
cd kubernetes
KUBE_COVER=y hack/test-go.sh
```
...
...
@@ -230,7 +230,7 @@ At the end of the run, an the HTML report will be generated with the path printe
To run tests and collect coverage in only one package, pass its relative path under the `kubernetes` directory as an argument, for example:
```
```sh
cd kubernetes
KUBE_COVER=y hack/test-go.sh pkg/kubectl
```
...
...
@@ -243,7 +243,7 @@ Coverage results for the project can also be viewed on [Coveralls](https://cover
You need an [etcd](https://github.com/coreos/etcd/releases/tag/v2.0.0) in your path, please make sure it is installed and in your ``$PATH``.
```
```sh
cd kubernetes
hack/test-integration.sh
```
...
...
@@ -252,14 +252,14 @@ hack/test-integration.sh
You can run an end-to-end test which will bring up a master and two nodes, perform some tests, and then tear everything down. Make sure you have followed the getting started steps for your chosen cloud platform (which might involve changing the `KUBERNETES_PROVIDER` environment variable to something other than "gce".
```
```sh
cd kubernetes
hack/e2e-test.sh
```
Pressing control-C should result in an orderly shutdown but if something goes wrong and you still have some VMs running you can force a cleanup with this command:
```
```sh
go run hack/e2e.go --down
```
...
...
@@ -332,7 +332,7 @@ See [conformance-test.sh](../../hack/conformance-test.sh).
Note that we omit the labels and the selector fields of the replication controller, because they will be populated from the labels field of the pod template by default.
@@ -35,7 +35,7 @@ Documentation for other releases can be found at
You can use [hack/get-build.sh](../../hack/get-build.sh) to or use as a reference on how to get the most recent builds with curl. With `get-build.sh` you can grab the most recent stable build, the most recent release candidate, or the most recent build to pass our ci and gce e2e tests (essentially a nightly build).
to the init(c *Config) method in 'pkg/master/master.go' and import 'net/http/pprof' package.
...
...
@@ -57,13 +57,13 @@ In most use cases to use profiler service it's enough to do 'import _ net/http/p
Even when running profiler I found not really straightforward to use 'go tool pprof' with it. The problem is that at least for dev purposes certificates generated for APIserver are not signed by anyone trusted and because secureServer serves only secure traffic it isn't straightforward to connect to the service. The best workaround I found is by creating an ssh tunnel from the kubernetes_master open unsecured port to some external server, and use this server as a proxy. To save everyone looking for correct ssh flags, it is done by running: