整理参与Kubernetes的相关内容:
slack channel: http://slack.k8s.io/
google group: https://groups.google.com/forum/#!forum/kubernetes-dev
weekly community meeting: https://groups.google.com/forum/#!forum/kubernetes-community-video-chat
官方的Meetup:
https://www.meetup.com/topics/kubernetes/
https://www.meetup.com/Kubernetes-Cloud-Native-Online-Meetup/
Kubernetes API: https://kubernetes.io/docs/reference/
kuberntes.io --教程
kubeweekly ---案例分享
design-proposal 设计方案说明(https://github.com/kubernetes/community/blob/master/contributors/design-proposals/),同样可以用来学习插件的开发.
kubernets项目更好的参与 https://github.com/kubernetes/community/tree/master/contributors/devel
list of SIGs(罗列了主要的SIG以及Meetings时间)
https://github.com/kubernetes/community/blob/master/sig-list.md
name | URL |
---|---|
API Machinery | https://github.com/kubernetes/community/blob/master/sig-api-machinery/README.md |
AWS | https://github.com/kubernetes/community/blob/master/sig-aws/README.md |
Apps | https://github.com/kubernetes/community/blob/master/sig-apps/README.md |
Architecture | https://github.com/kubernetes/community/blob/master/sig-architecture/README.md |
Auth | https://github.com/kubernetes/community/blob/master/sig-auth/README.md |
Autoscaling | https://github.com/kubernetes/community/blob/master/sig-autoscaling/README.md |
Azure | https://github.com/kubernetes/community/blob/master/sig-azure/README.md |
Big Data | https://github.com/kubernetes/community/blob/master/sig-big-data/README.md |
CLI | https://github.com/kubernetes/community/blob/master/sig-cli/README.md |
Cluster Lifecycle | https://github.com/kubernetes/community/blob/master/sig-cluster-lifecycle/README.md |
Cluster Ops | https://github.com/kubernetes/community/blob/master/sig-cluster-ops/README.md |
Contributor Experience | https://github.com/kubernetes/community/blob/master/sig-contributor-experience/README.md |
Docs | https://github.com/kubernetes/community/blob/master/sig-docs/README.md |
Federation | https://github.com/kubernetes/community/blob/master/sig-federation/README.md |
Instrumentation | https://github.com/kubernetes/community/blob/master/sig-instrumentation/README.md |
Network | https://github.com/kubernetes/community/blob/master/sig-network/README.md |
Node | https://github.com/kubernetes/community/blob/master/sig-node/README.md |
On Premise | https://github.com/kubernetes/community/blob/master/sig-on-premise/README.md |
OpenStack | https://github.com/kubernetes/community/blob/master/sig-openstack/README.md |
Product Management | https://github.com/kubernetes/community/blob/master/sig-product-management/README.md |
Scalability | https://github.com/kubernetes/community/blob/master/sig-scalability/README.md |
Scheduling | https://github.com/kubernetes/community/blob/master/sig-scheduling/README.md |
Service Catalog | https://github.com/kubernetes/community/blob/master/sig-service-catalog/README.md |
Storage | https://github.com/kubernetes/community/blob/master/sig-storage/README.md |
Testing | https://github.com/kubernetes/community/blob/master/sig-testing/README.md |
UI | https://github.com/kubernetes/community/blob/master/sig-ui/README.md |
Windows | https://github.com/kubernetes/community/blob/master/sig-windows/README.md |
Container Identity | https://github.com/kubernetes/community/blob/master/wg-container-identity/README.md |
Resource Management | https://github.com/kubernetes/community/blob/master/wg-resource-management/README.md |
https://github.com/kubernetes/community/blob/master/contributors/devel/README.md
https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md
有几篇强相关的文档可以read一下,包含的内容
测试(unit, integration and e2e test)
unit测试
运行unit测试,下面是一些常用的例子
cd kubernetes
make test #Run all unit tests
make test WHAT=./pkg/api #Run tests for pkg/api
make test WHAT=”./pkg/api ./pkg/kubelet” # run tests for pkg/api and pkg/kubelet
指定需要运行的test方法
# Runs TestValidatePod in pkg/api/validation with the verbose flag set
make test WHAT=./pkg/api/validation GOFLAGS="-v" KUBE_TEST_ARGS='-run ^TestValidatePod$'
# Runs tests that match the regex ValidatePod|ValidateConfigMap in pkg/api/validation
make test WHAT=./pkg/api/validation GOFLAGS="-v" KUBE_TEST_ARGS="-run ValidatePod|ValidateConfigMap$"
压力测试
make test PARALLEL=2 ITERATION=5
生成覆盖率
make test PARALLEL=2 ITERATION=5
make test WHAT=./pkg/kubectl KUBE_COVER=y #only one package-k8s-images
Benchmark unit tests
go test ./pkg/apiserver -benchmem -run=XXX -bench=BenchmarkWatch
集成测试Integration tests
End-to-End tests
https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md
flake free tests
place Kubernetes' code on your GOPATH using the following cloning procedure. working_dir=$GOPATH/src/k8s.io
mkdir -p $working_dir
cd $working_dir
git clone https://github.com/$user/kubernetes.git
# or: git clone [email protected]:$user/kubernetes.git
cd $working_dir/kubernetes
git remote add upstream https://github.com/kubernetes/kubernetes.git
# or: git remote add upstream [email protected]:kubernetes/kubernetes.git
# Never push to upstream master
git remote set-url --push upstream no_push
# Confirm that your remotes make sense:
git remote -v
3 Branch
Get your local master up to date:
cd $working_dir/kubernetes
git fetch upstream
git checkout master
git rebase upstream/master
Branch from it:
git checkout -b myfeature
cd $working_dir/kubernetes
make
make GOGCFLAGS="-e"
make GOGCFLAGS="-N -l"
make cross
cd $working_dir/kubernetes
# Run all the presubmission verification. Then, run a specific update script (hack/update-*.sh)
# for each failed verification. For example:
# hack/update-gofmt.sh (to make sure all files are correctly formatted, usually needed when you add new files)
# hack/update-bazel.sh (to update bazel build related files, usually needed when you add or remove imports)
make verify
\# Alternatively, run all update scripts to avoid fixing verification failures one by one.
make update
Run every unit test
make test
# Run package tests verbosely
make test WHAT=./pkg/api/helper GOFLAGS=-v
# Run integration tests, requires etcd
# For more info, visit https://github.com/kubernetes/community/blob/master/contributors/devel/testing.md#integration-tests
make test-integration
# Run e2e tests by building test binaries, turn up a test cluster, run all tests, and tear the cluster down
# Equivalent to: go run hack/e2e.go -- -v --build --up --test --down
# Note: running all e2e tests takes a LONG time! To run specific e2e tests, visit:
# https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md#building-kubernetes-and-running-the-tests
make test-e2e
See the testing guide and end-to-end tests for additional information and scenarios.
Run make help for additional information on these make targets.
# While on your myfeature branch
git fetch upstream
git rebase upstream/master
git commit
Push
When ready to review (or just to establish an offsite backup or your work), push your branch to your fork on github.com:
git push -f ${your_remote_name} myfeature
Create a pull request
Get a code review
Once your pull request has been opened it will be assigned to one or more reviewers. Those reviewers will do a thorough code review, looking for correctness, bugs, opportunities for improvement, documentation and comments, and style.
Commit changes made in response to review comments to the same branch on your fork.
Very small PRs are easy to review. Very large PRs are very difficult to review. At the assigned reviewer’s discretion, a PR may be switched to use Reviewable instead. Once a PR is switched to Reviewable, please ONLY send or reply to comments through Reviewable. Mixing code review tools can be very confusing.
See Faster Reviews for some thoughts on how to streamline the review process.