Production-Grade Container Scheduling and Management
Go to file
Albert Sverdlov a46bab6930
Fix a job quota related deadlock (#119776)
* Fix a job quota related deadlock

In case ResourceQuota is used and sets a max # of jobs, a CronJob may get
trapped in a deadlock:
  1. Job quota for a namespace is reached.
  2. CronJob controller can't create a new job, because quota is
     reached.
  3. Cleanup of jobs owned by a cronjob doesn't happen, because a
     control loop iteration is finished because of an error to create a
     job.

To fix this we stop early quitting from a control loop iteration when
cronjob reconciliation failed and always let old jobs to be cleaned up.

* Dont reorder imports

* Don't stop requeuing on reconciliation error

Previous code only logged the reconciliation error inside jm.sync() and
didn't return the reconciliation error to it's invoker
processNextWorkItem().

Adding a copy-paste back to avoid this issue.

* Remove copy-pasted cleanupFinishedJobs()

Now we always call jm.cleanupFinishedJobs() first and then
jm.syncCronJob().

We also extract cronJobCopy and updateStatus outside jm.syncCronJob
function and pass pointers to them in both jm.syncCronJob and
jm.cleanupFinishedJobs to make delayed updates handling more explicit
and not dependent on the order in which cleanupFinishedJobs and
syncCronJob are invoked.

* Return updateStatus bool instead of changing the reference

* Explicitly ignore err in tests to fix linter
2023-08-31 08:25:00 -07:00
.github Add new contribex leads to sig-contribex-approvers 2023-04-10 12:34:03 +05:30
api Mark Job onPodConditions as optional in pod failure policy 2023-08-28 11:42:56 +02:00
build revert PR https://github.com/kubernetes/kubernetes/pull/119592 2023-08-28 23:57:17 +05:30
CHANGELOG CHANGELOG: Update directory for v1.28.1 release 2023-08-24 13:41:18 +00:00
cluster Merge pull request #119933 from saschagrunert/cri-tools 2023-08-27 08:55:21 -07:00
cmd Allow specifying ExternalTrafficPolicy for ClusterIP Services with ExternalIPs 2023-08-30 23:56:47 +08:00
docs
hack local debugging should utilize the same defaults as prod 2023-08-29 16:38:24 -04:00
LICENSES vendor 2023-06-02 14:34:25 +00:00
logo
pkg Fix a job quota related deadlock (#119776) 2023-08-31 08:25:00 -07:00
plugin api: introduce separate VolumeResourceRequirements struct 2023-08-21 15:31:28 +02:00
staging Merge pull request #119150 from tnqn/external-traffic-policy-external-ips 2023-08-31 08:24:48 -07:00
test Merge pull request #119150 from tnqn/external-traffic-policy-external-ips 2023-08-31 08:24:48 -07:00
third_party verify: nicer failure message rendering in Prow 2023-06-02 15:39:27 +02:00
vendor Bump runc to v1.1.9 2023-08-30 08:21:59 -04:00
.generated_files
.gitattributes
.gitignore Add go.work and go.work.sum to .gitignore 2023-05-05 11:16:23 -04:00
.go-version [go] Bump images, versions and deps to use Go 1.20.7 2023-08-07 13:25:59 -06:00
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
go.mod Bump runc to v1.1.9 2023-08-30 08:21:59 -04:00
go.sum Bump runc to v1.1.9 2023-08-30 08:21:59 -04:00
LICENSE
Makefile
OWNERS
OWNERS_ALIASES Prune sig-auth-encryption-at-rest-reviewers and drop lavalamp across aliases 2023-08-29 09:02:08 -04:00
README.md Merge pull request #116709 from R3DRUN3/master 2023-05-03 12:02:09 -07:00
SECURITY_CONTACTS
SUPPORT.md

Kubernetes (K8s)

CII Best Practices Go Report Card GitHub release (latest SemVer)


Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for the 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.

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 the 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.