Production-Grade Container Scheduling and Management
Go to file
Madhav Jivrajani 347607e971 cacher: watchCacheInterval to reduce lock contention
watchCacheInterval serves as an abstraction over a source
of watchCacheEvents. It maintains a window of events over
an underlying source and these events can be served using
the exposed Next() API. The main intent for doing things
this way is to introduce an upper bound of memory usage
for starting a watch and reduce the maximum possible time
interval for which the lock would be held while events are
copied over.

The source of events for the interval is typically either
the watchCache circular buffer, if events being retrieved
need to be for resource versions > 0 or the underlying
implementation of Store, if resource version = 0.

Furthermore, an interval can be either valid or invalid at
any given point of time. The notion of validity makes sense
only in cases where the window of events in the underlying
source can change over time - i.e. for watchCache circular
buffer. When the circular buffer is full and an event needs
to be popped off, watchCache::startIndex is incremented. In
this case, an interval tracking that popped event is valid
only if it has already been copied to its internal buffer.
However, for efficiency we perform that lazily and we mark
an interval as invalid iff we need to copy events from the
watchCache and we end up needing events that have already
been popped off. This translates to the following condition:
  watchCacheInterval::startIndex >= watchCache::startIndex.
When this condition becomes false, the interval is no longer
valid and should not be used to retrieve and serve elements
from the underlying source.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2022-01-24 19:35:53 +05:30
.github OWNERS(justaugustus): Prune extraneous reviewer roles 2021-11-11 12:03:06 -05:00
api Regenerate openapi v3 fixtures 2021-11-24 10:03:45 -05:00
build test-e2e-node: support pure SSH mode 2021-11-22 10:13:15 -05:00
CHANGELOG CHANGELOG: Update directory for v1.23.0-rc.0 release 2021-11-24 06:19:11 +00:00
cluster turning off default storage class in kube-up 2021-11-16 19:26:30 +00:00
cmd Merge pull request #106520 from pohly/log-print-flags 2021-11-18 01:53:02 -08:00
docs hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
hack Unversion and normalize openapi v3 fixtures 2021-11-24 10:03:36 -05:00
LICENSES Pin new dependency: github.com/google/cel-go v0.9.0 2021-11-10 13:15:40 -05:00
logo Create colors.md 2021-01-15 22:15:43 -08:00
pkg Merge pull request #106616 from mattcary/pvc-race 2021-11-23 09:38:17 -08:00
plugin controller change for statefulset auto-delete (implementation) 2021-11-17 16:48:50 -08:00
staging cacher: watchCacheInterval to reduce lock contention 2022-01-24 19:35:53 +05:30
test Revert "update expected ordering" 2021-11-24 11:19:27 -05:00
third_party Copy golang license to staging copies 2021-08-10 17:37:28 -04:00
vendor Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2 2021-11-24 10:32:24 -05:00
.generated_files Purge almost all memories of godep 2020-05-07 21:49:00 -07:00
.gitattributes review staging go.mod files 2019-05-10 15:40:43 -04:00
.gitignore Rename _examples to examples 2021-01-25 10:20:46 -08:00
.golangci.yaml fix golangci-lint config file using exclude-rules 2021-11-17 13:58:53 +01:00
CHANGELOG.md CHANGELOG: Move changelog, soft-link to top-level, refresh listing 2020-02-06 01:04:44 -05:00
code-of-conduct.md
CONTRIBUTING.md Remove stale analytics links from docs 2020-11-18 07:04:48 -06:00
go.mod Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2 2021-11-24 10:32:24 -05:00
go.sum Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2 2021-11-24 10:32:24 -05:00
LICENSE
Makefile
Makefile.generated_files
OWNERS Move brendandburns to to emeritus status. 2020-08-27 10:20:56 -04:00
OWNERS_ALIASES Add missing alias - used in staging/src/k8s.io/cluster-bootstrap/OWNERS 2021-11-15 14:50:57 -05:00
README.md Update godoc reference widget to pkg.go.dev 2021-01-26 09:34:07 -05:00
SECURITY_CONTACTS Update SECURITY_CONTACTS with current PSC 2019-05-29 15:22:35 +05:30
SUPPORT.md delete all duplicate empty blanks 2019-02-23 10:28:04 +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.