Commit Graph

118109 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
8777747c98
Merge pull request #119150 from tnqn/external-traffic-policy-external-ips
Allow specifying ExternalTrafficPolicy for Services with ExternalIPs
2023-08-31 08:24:48 -07:00
Kubernetes Prow Robot
61d87fdb2e
Merge pull request #117502 from Nordix/drain-improvements/adil
Adding more callbacks in kubedrain helper
2023-08-31 06:58:48 -07:00
Kubernetes Prow Robot
76b06ee239
Merge pull request #120288 from tzneal/fix-pid-pressure-flake
fix a PidPressure test flake
2023-08-31 05:46:48 -07:00
adil ghaffar
0323fe42e2
adding more callbacks in kubedrain helper 2023-08-31 14:35:09 +03:00
Kubernetes Prow Robot
8daecd125e
Merge pull request #120265 from serathius/refactor-store
Refactor store
2023-08-31 02:48:47 -07:00
Kubernetes Prow Robot
7bde29372a
Merge pull request #120258 from dims/update-runc-to-v1.1.9
Bump runc to v1.1.9
2023-08-31 01:44:59 -07:00
Kubernetes Prow Robot
def694bbe0
Merge pull request #119801 from wojtek-t/refactor_watch_encoders
Refactor apiserver endpoint transformers to more natively use Encoders
2023-08-31 01:44:48 -07:00
Marek Siarkowicz
e01bd64144 Avoid creating local variables that don't change
Having local variables gives false impression that this is overwritten
in the function block.
2023-08-31 09:34:37 +02:00
Marek Siarkowicz
10553a1966 Flatten switch case 2023-08-31 09:34:12 +02:00
Marek Siarkowicz
1f4f2a5d60 Refactor common WithRange case
From API call WithRange and WithPrefix work the same, they just set the range end.
The difference is when the range end is provided:
* WithRange(end) requires providing the end while calling
* WithPrefix() calculates the end based on key provided to the Get.

For example, those are equal:
* client.Get(ctx, "/pods/", WithPrefix())
* client.Get(ctx, "/pods/", WithRange(GetPrfixRangeEnd("/pods/")))

As keyPrefix is equal preparedKey there should not be a difference.
2023-08-31 09:31:58 +02:00
Kubernetes Prow Robot
887ac275a2
Merge pull request #120250 from liyuerich/apimachinery
e2e_apimachinery:stop using deprecated framework.ExpectError
2023-08-30 23:40:47 -07:00
Todd Neal
ede524e1a6 fix a pidpressure test flake
With the new busybox, ash has a built-in sleep command. Prior to this
change we were creating half the pids expected since `sleep` wasn't
actually launching a new binary.  Use the full path to /bin/sleep which
avoids the built-in and actually launches a new process.
2023-08-30 22:44:36 -05:00
Kubernetes Prow Robot
a0873d37c5
Merge pull request #120266 from serathius/remove-returnRV
Remove duplicated returnRV variable
2023-08-30 12:30:47 -07:00
Wojciech Tyczyński
160589a0ed Refactor transformers for watch to implement Encoder interface 2023-08-30 20:53:43 +02:00
Quan Tian
16a7b53602 Fix typos in comments
Signed-off-by: Quan Tian <qtian@vmware.com>
2023-08-30 23:56:47 +08:00
Quan Tian
2b69daa960 Allow specifying ExternalTrafficPolicy for ClusterIP Services with ExternalIPs
When defining a ClusterIP Service, we can specify externalIP, and the
traffic policy of externalIP is subject to externalTrafficPolicy.
However, the policy can't be set when type is not NodePort or
LoadBalancer, and will default to Cluster when kube-proxy processes the
Service.

This commit updates the defaulting and validation of Service to allow
specifying ExternalTrafficPolicy for ClusterIP Services with
ExternalIPs.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-08-30 23:56:47 +08:00
Marek Siarkowicz
be4692864b Remove duplicated returnRV variable
returnRV was was equal to withRev, but updated at different time.

When preparing the request they are set equal to each other.

The only difference was during the for loop.
returnRV was always set no matter if pagination was enabled, while withRev only when paginating.
2023-08-30 17:36:09 +02:00
Davanum Srinivas
a926f594da
Bump runc to v1.1.9
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-08-30 08:21:59 -04:00
Kubernetes Prow Robot
3cf3702d1e
Merge pull request #119346 from chendave/clean_testcases
kubeadm: Remove the usage to print the default component configs for `reset` and `join`
2023-08-30 04:38:48 -07:00
Kubernetes Prow Robot
370c85f5ab
Merge pull request #118493 from kerthcet/cleanup/pod-status-reason
Remove reasons from PodConditionType
2023-08-30 01:40:47 -07:00
Dave Chen
879dad9c2f kubeadm: Remove the usage to print the default component configs for reset and join
component configs is only needed for `kubeadm init`, the `join` and `reset` doesn't
need to provid the config with component configs.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-08-30 15:38:21 +08:00
Kubernetes Prow Robot
1144c85a92
Merge pull request #119649 from wackxu/Paginatelist
paginate initial list inside the storage watcher
2023-08-30 00:36:58 -07:00
Kubernetes Prow Robot
c723f46603
Merge pull request #119463 from Songjoy/cleanup-e2e-windows-framework-equal
e2e_windows: stop using deprecated framework.ExpectEqual
2023-08-30 00:36:47 -07:00
liyuerich
53cb35d6d4 e2e_apimachinery:stop using deprecated framework.ExpectError
Signed-off-by: liyuerich <yue.li@daocloud.io>
2023-08-30 14:31:58 +08:00
Kubernetes Prow Robot
c51915c1c1
Merge pull request #120243 from kannon92/local-up-cluster-eviction-defaults
EvictionHard Settings in local-up-cluster should match our defaults.
2023-08-29 15:45:56 -07:00
Kevin Hannon
5dbec5c715 local debugging should utilize the same defaults as prod 2023-08-29 16:38:24 -04:00
Kubernetes Prow Robot
0cf16b1363
Merge pull request #120235 from enj/patch-8
Prune sig-auth-encryption-at-rest-reviewers and drop lavalamp across aliases
2023-08-29 12:26:09 -07:00
Kubernetes Prow Robot
3dd93d2bd7
Merge pull request #114717 from kerthcet/fix/bind-skip-status
Add new testcases to integration test TestBindPlugin
2023-08-29 12:25:56 -07:00
Kubernetes Prow Robot
2a23eba15b
Merge pull request #120231 from MartinForReal/patch-1
Extend npd e2e timeout to fix npd e2e error
2023-08-29 11:21:33 -07:00
Kubernetes Prow Robot
0b70423e24
Merge pull request #119537 from ardaguclu/kubectl-debug-cleaning
kubectl debug: Introduce customizable AttachFunc instead static one
2023-08-29 11:21:22 -07:00
Kubernetes Prow Robot
8b4f5bb54b
Merge pull request #120218 from rakshitgondwal/feat/protobuf-version-update
feat: update google.golang.org/protobuf to v1.31.0
2023-08-29 08:11:36 -07:00
Kubernetes Prow Robot
8374067038
Merge pull request #120177 from stevekuznetsov/skuznets/generate-crd-applyconfigurations
apiextensions-apiserver: generate applyconfigurations
2023-08-29 08:11:22 -07:00
Kubernetes Prow Robot
973ea2d376
Merge pull request #120228 from pacoxu/kubeadm-learner-etcd-beta
kubeadm: promote EtcdLearnerMode to beta
2023-08-29 06:29:21 -07:00
Mo Khan
8581703b07
Prune sig-auth-encryption-at-rest-reviewers and drop lavalamp across aliases 2023-08-29 09:02:08 -04:00
Kubernetes Prow Robot
34b85c593d
Merge pull request #120198 from pacoxu/kubeadm-swap
kubeadm: update swap warning for v1.28 change
2023-08-29 04:53:32 -07:00
Kubernetes Prow Robot
f9e9d38a88
Merge pull request #119488 from carlory/cleanup-e2e-cloud-framework-equal
e2e_cloud: stop using deprecated framework.ExpectEqual
2023-08-29 04:53:21 -07:00
Kubernetes Prow Robot
52a6998b42
Merge pull request #120219 from rayandas/rayan-revert-kubectl-changes
Revert Dockerfile changes for kubectl image.
2023-08-29 03:41:20 -07:00
wackxu
f5d6c65186 paginate initial list inside the storage watcher
Signed-off-by: wackxu <xushiwei5@huawei.com>
2023-08-29 17:24:36 +08:00
Fan Shang Xiang
8d9517318a
Extend npd e2e timeout to fix npd e2e error 2023-08-29 17:22:28 +08:00
Kubernetes Prow Robot
6eca142082
Merge pull request #120212 from p0lyn0mial/upstream-etcd-watcher-validation
storage/etcd3: error when progressNotify option set and newFunc was not provided for a registry
2023-08-29 01:27:21 -07:00
Paco Xu
618e40c61b kubeadm: promote EtcdLearnerMode to beta 2023-08-29 16:11:05 +08:00
Kubernetes Prow Robot
8428655308
Merge pull request #119963 from pohly/dra-scheduler-perf-multiple-claims
dra: scheduler_perf test case with multiple claims per pod
2023-08-29 00:25:34 -07:00
Kubernetes Prow Robot
cd91351dff
Merge pull request #117720 from kerthcet/feat/remove-selector-spread
Remove deprecated selectorSpread
2023-08-29 00:25:22 -07:00
Wojciech Tyczyński
b2c0d80c37 Test watch converter encoder 2023-08-29 09:04:12 +02:00
Kubernetes Prow Robot
27c9d32d46
Merge pull request #120101 from lowang-bh/Hotfix
fix: concurrent map writes in e2e test
2023-08-28 23:19:20 -07:00
Kubernetes Prow Robot
3e910875a7
Merge pull request #120125 from kerthcet/cleanup/write-to-cycle
Make sure skipped score plugins always returned
2023-08-28 15:13:20 -07:00
Kubernetes Prow Robot
f3d0392e07
Merge pull request #119695 from ii/create-pv-pvc-lifecycle-test
Write e2e test for PersistentVolume & PersistentVolumeClaim Endpoints + 13 Endpoints
2023-08-28 13:27:20 -07:00
Rayan Das
651eb2fa58 revert PR https://github.com/kubernetes/kubernetes/pull/119592 2023-08-28 23:57:17 +05:30
Rakshit Gondwal
709721e0df feat: update google.golang.org/protobuf to v1.31.0
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
2023-08-28 23:38:32 +05:30