This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core. Consider creating a new repo instead.
Clone or download
k8s-ci-robot Merge pull request #2956 from mirake/fix-typos
Fix some typos: Editting -> Editing/do -> to
Latest commit 4b2a851 Sep 24, 2018
Permalink
Failed to load latest commit information.
404-server Adding new 404-server location to README.md Aug 14, 2017
addon-resizer README with the new repo link for addon-resizer Jun 16, 2017
ansible Fix some typos: Editting -> Editing/do -> to Sep 23, 2018
cluster-autoscaler Cluster-autoscaler: add redirect README and FAQ Apr 19, 2017
cni-plugins Update README.md Aug 16, 2018
continuousdelivery Typo fix comand->command Apr 26, 2018
diurnal Convert registry to k8s.gcr.io Feb 2, 2018
docker-micro-benchmark fix misspell “inspect” in config.go Feb 26, 2017
election Pushes go to staging-k8s.gcr.io Feb 2, 2018
exec-healthz Merge pull request #2874 from sunlintong/feature-2 Jul 18, 2018
flannel-server Pushes go to staging-k8s.gcr.io Feb 2, 2018
fluentd Stackdriver integration removal step 2: remove all files except READM… Jul 13, 2017
for-demos Pushes go to staging-k8s.gcr.io Feb 2, 2018
git-sync Make assignees approvers and reviewers Dec 15, 2016
hack Bump travis golang to 1.9. Jan 11, 2018
images Pushes go to staging-k8s.gcr.io Feb 2, 2018
ingress Fix typo: permissable -> permissible Sep 8, 2018
init The --api-servers is no longer supported by Kubelet 1.9, use the kube… Apr 30, 2018
keepalived-vip Merge pull request #2845 from Davidchinacloud/dev Jun 1, 2018
kubeform make golint happy Sep 26, 2017
kubelet-to-gcm Stackdriver integration removal step 2: remove all files except READM… Jul 13, 2017
logging Remove old logging info and replace with a link to the docs Feb 17, 2017
metadata-proxy Add link to redirect Feb 1, 2018
micro-demos Convert registry to k8s.gcr.io Feb 2, 2018
mungegithub Directory moved to test-infra Jan 21, 2017
netperf-tester Make assignees approvers and reviewers Dec 15, 2016
node-perf-dash Merge pull request #2908 from AdamDang/patch-7 Jul 6, 2018
peer-finder Pushes go to staging-k8s.gcr.io Feb 2, 2018
podex Make assignees approvers and reviewers Dec 15, 2016
prometheus-to-sd Stackdriver integration removal step 2: remove all files except READM… Jul 13, 2017
prometheus Merge pull request #2119 from brancz/prometheus Dec 28, 2016
recipes Always --pull in docker build to ensure recent base images Jan 10, 2017
release-notes Make assignees approvers and reviewers Dec 15, 2016
rescheduler Fix Rescheduler Makefile Jun 26, 2018
scale-demo Pushes go to staging-k8s.gcr.io Feb 2, 2018
scratch-debugger Convert registry to k8s.gcr.io Feb 2, 2018
service-loadbalancer Merge pull request #2874 from sunlintong/feature-2 Jul 18, 2018
startup-script [startup-script] Don't cache apk update results Mar 11, 2018
statefulsets Zookeeper: Typo fix in purge interval property Aug 31, 2018
test-utils fix some typos for test-utils/utils/utils.go Jul 11, 2017
.gitignore Huge rewrite to submit-queue and mungegithub Sep 16, 2015
.travis.yml Bump travis golang to 1.9. Jan 11, 2018
CONTRIBUTING.md link to the official CONTRIBUTING.md doc Aug 31, 2015
LICENSE first commit, add license and readme Aug 13, 2015
OWNERS Add spiffxp as root OWNER Aug 9, 2018
README.md Merge branch 'master' into goreportcard Apr 18, 2017
code-of-conduct.md Add code-of-conduct.md Dec 20, 2017
labels.yaml Updating labels to CNCF ones. Sep 21, 2016

README.md

Kubernetes Contrib

Build Status Go Report Card APACHEv2 License

Do not add new projects to this repository. We eventually want to move all code in this repository to more appropriate repositories (see #762). Create a new repository in kubernetes-incubator instead (process).

Getting the Code

The code must be checked out as a subdirectory of k8s.io, and not github.com.

mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
# Replace "$YOUR_GITHUB_USERNAME" below with your github username
git clone https://github.com/$YOUR_GITHUB_USERNAME/contrib.git
cd contrib

Updating Godeps

Godeps in contrib/ has a different layout than in kubernetes/ proper. This is because contrib contains multiple tiny projects, each with their own dependencies. Each in contrib/ has it's own Godeps.json. For example the Godeps.json for Ingress is Ingress/Godeps/Godeps.json. This means that godeps commands like godep restore or godep test do not work in the root directory. They should be run from inside the subproject directory you want to test.

Prerequisites for updating Godeps

Since we vendor godeps through /vendor vs the old style Godeps/_workspace, you either need a more recent install of go and godeps, or you need to set GO15VENDOREXPERIMENT=1. Eg:

$ godep version
godep v74 (linux/amd64/go1.6.1)
$ go version
go version go1.6.1 linux/amd64
$ godep save ./...

Will automatically save godeps to vendor/ instead of _workspace/. If you have an older version of go, you must run:

$ GO15VENDOREXPERIMENT=1 godep save ./...

If you have an older version of godep, you must update it:

$ go get github.com/tools/godep
$ cd $GOPATH/src/github.com/tools/godep
$ go build -o godep *.go

Updating Godeps

The most common dep to update is obviously going to be kubernetes proper. Updating kubernetes and it's dependancies in the Ingress subproject for example can be done as follows (the example assumes your Kubernetes repo is rooted at $GOPATH/src/github.com/kubernetes, s/github.com\/kubernetes/k8s.io/ as required):

cd $GOPATH/src/github.com/kubernetes/contrib/ingress
godep restore
go get -u github.com/kubernetes/kubernetes
cd $GOPATH/src/github.com/kubernetes/kubernetes
godep restore
cd $GOPATH/src/github/kubernetes/contrib/ingress
rm -rf Godeps
godep save ./...
git [add/remove] as needed
git commit

Other deps are similar, although if the dep you wish to update is included from kubernetes we probably want to stay in sync using the above method. If the dep is not in kubernetes proper something like the following should get you a nice clean result:

cd $GOPATH/src/github/kubernetes/contrib/ingress
godep restore
go get -u $SOME_DEP
rm -rf Godeps
godep save ./...
git [add/remove] as needed
git commit

Running all tests

To run all go test in all projects do this:

./hack/for-go-proj.sh test

Getting PRs Merged Into Contrib

In order for your PR to get merged, it must have the both lgtm AND approved labels. When you open a PR, the k8s-merge-bot will automatically assign a reviewer from the OWNERS files. Once assigned, the reviewer can then comment /lgtm, which will add the lgtm label, or if he/she has permission, the reviewer can add the label directly.

Each file modified in the PR will also need to be approved by an approver from its OWNERS file or an approver in a parent directory's OWNERS file. A file is approved when the approver comments /approve, and it is unapproved if an approver comments /approve cancel. When all files have been approved, the approved label will automatically be added by the k8s-merge-bot and the PR will be added to the submit-queue to be merged.