Production-Grade Container Scheduling and Management
Go to file
Rodrigo Campos 466c4d24a9 pkg/kubelet: skip long test on short mode
When adding functionality to the kubelet package and a test file, is
kind of painful to run unit tests today locally.

We usually can't run specifying the test file, as if xx_test.go and
xx.go use the same package, we need to specify all the dependencies. As
soon as xx.go uses the Kuebelet type (we need to do that to fake a
kubelet in the unit tests), this is completely impossible to do in
practice.

So the other option is to run the unit tests for the whole package or
run only a specific funtion. Running a single function can work in some
cases, but it is painful when we want to test all the functions we
wrote. On the other hand, running the test for the whole package is very
slow.

Today some unit tests try to connect to the API server (with retries)
create and list lot of pods/volumes, etc. This makes running the unit
test for the kubelet package slow.

This patch tries to make running the unit test for the whole package
more palatable. This patch adds a skip if the short version was
requested (go test -short ...), so we don't try to connect
to the API server or skip other slow tests.

Before this patch running the unit tests took in my computer (I've run
it several times so the compilation is already done):

	$ time go test -v
	real	0m21.303s
	user	0m9.033s
	sys	0m2.052s

With this patch it takes ~1/3 of the time:

	$ time go test -short -v
	real	0m7.825s
	user	0m9.588s
	sys	0m1.723s

Around 8 seconds is something I can wait to run the tests :)

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-06-24 18:00:21 +02:00
.github Fix typo in bug report template 2022-02-28 12:34:43 +03:00
api RBAC: Modify the Description for the apiGroup. 2022-06-14 13:31:09 +05:30
build Merge pull request #110379 from marosset/windows-pause-image-base 2022-06-15 14:41:10 -07:00
CHANGELOG CHANGELOG: Update directory for v1.24.2 release 2022-06-17 03:43:36 +00:00
cluster Bump konnectivity-client to 0.0.32 2022-06-22 17:22:42 -07:00
cmd Merge pull request #110656 from pacoxu/kubeadm-dup-unix 2022-06-24 00:21:21 -07:00
docs
hack clean up spelling_failures 2022-06-21 17:33:46 +08:00
LICENSES Merge pull request #110510 from dims/switch-to-github.com/MakeNowJust/heredoc-v1.0.0-and-avoid-SHA 2022-06-10 16:23:44 -07:00
logo
pkg pkg/kubelet: skip long test on short mode 2022-06-24 18:00:21 +02:00
plugin Merge pull request #110410 from Jiawei0227/master 2022-06-22 04:05:48 -07:00
staging Merge pull request #110764 from soltysh/improve_msg 2022-06-24 02:27:09 -07:00
test Merge pull request #110652 from Abirdcfly/fixchunksize 2022-06-22 18:21:43 -07:00
third_party Merge pull request #109244 from alexzielenski/clean-third-party-forks 2022-05-03 19:29:35 -07:00
vendor Merge pull request #109510 from sugangli/pinhole-fw 2022-06-23 16:13:20 -07:00
.generated_files
.gitattributes
.gitignore Add the last zz_generated.openapi.go file 2022-02-28 10:17:54 -08:00
.golangci.yaml hack: integrate logcheck into golangci-lint 2022-03-24 11:21:03 +01:00
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
go.mod Merge pull request #109510 from sugangli/pinhole-fw 2022-06-23 16:13:20 -07:00
go.sum Merge pull request #109510 from sugangli/pinhole-fw 2022-06-23 16:13:20 -07:00
LICENSE
Makefile
Makefile.generated_files
OWNERS for ./OWNERS, ensure approvers are in reviewers and emeritus approvers are not in reviewers 2022-02-03 22:43:04 -08:00
OWNERS_ALIASES nominate kerthcet as sig scheduler reviewer 2022-06-17 19:25:34 +08:00
README.md update k8s url 2022-05-02 20:55:55 +08:00
SECURITY_CONTACTS
SUPPORT.md update k8s url 2022-05-02 20:55:55 +08:00

Kubernetes (K8s)

GoPkg Widget CII Best Practices


Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If your company wants to help shape the evolution of technologies that are container-packaged, dynamically scheduled, and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using K8s

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To use Kubernetes code as a library in other applications, see the list of published components. Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported.

To start developing K8s

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make
You have a working Docker environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Community Meetings

The Calendar has the list of all the meetings in Kubernetes community in a single location.

Adopters

The User Case Studies website has real-world use cases of organizations across industries that are deploying/migrating to Kubernetes.

Governance

Kubernetes project is governed by a framework of principles, values, policies and processes to help our community and constituents towards our shared goals.

The Kubernetes Community is the launching point for learning about how we organize ourselves.

The Kubernetes Steering community repo is used by the Kubernetes Steering Committee, which oversees governance of the Kubernetes project.

Roadmap

The Kubernetes Enhancements repo provides information about Kubernetes releases, as well as feature tracking and backlogs.