Commit Graph

118318 Commits

Author SHA1 Message Date
Patrick Ohly
062c57ae92 dra controller helper: make allocation error message more readable
Here's what it looked like before:

    err="allocation of one or more pod claims failed. Claim test-dra5z9nh-resource-1an8wcr: failed allocating claim 4739f9a2-eedc-4702-ab17-e201e2dc0ad2. Claim test-dra5z9nh-resource-1bbdsj2: failed allocating claim e5525e5a-3397-40b4-a633-9ac354605303."

Some observations:

- Inserting the claim UID is just noise because it doesn't get logged anywhere else.
- Concatenating on a single line makes it hard to see the individual errors.

Joining with errors.Join leads to more readable output. The claim name only
gets inserted if not present already, to keep the individual error entries
short:

  err=<
        	claim test-dralmx55-resource-1asvr5d: resources exhausted on node "scheduler-perf-dra-w62wm"
        	claim test-dralmx55-resource-1bqq6c9: resources exhausted on node "scheduler-perf-dra-w62wm"
   >
2023-09-01 09:42:10 +02:00
Patrick Ohly
f96e23e477 dra controller helper: merge log entries for informer events
Instead of emitting two log entries for new or updated ResourceClaim and
PodSchedulingContext, add the additional information for V(6) to the logger via
WithValues and emit one log entry. This makes the log shorter and easier to
read because related information is on one line.
2023-09-01 09:42:10 +02:00
Kubernetes Prow Robot
83f2d89dc9
Merge pull request #120313 from dairlair/patch-1
Refactor checkErr func
2023-08-31 22:02:42 -07:00
Kubernetes Prow Robot
ff5fc28ff3
Merge pull request #120044 from apricote/cp-port-0
Allow disabling both listened-on ports in cloud-provider
2023-08-31 22:02:31 -07:00
Kubernetes Prow Robot
8dc002532b
Merge pull request #120284 from vbatts/add_unwanted_modules
Add unwanted modules
2023-08-31 20:52:41 -07:00
Kubernetes Prow Robot
400059d025
Merge pull request #120194 from bzsuni/bz/bump/npd
bump npd to v0.8.14
2023-08-31 20:52:30 -07:00
Kubernetes Prow Robot
efadb94a74
Merge pull request #120259 from SataQiu/clean-apf-20230830
apf: remove v1alpha1 API
2023-08-31 19:44:42 -07:00
Kubernetes Prow Robot
36352ba306
Merge pull request #120233 from xuzhenglun/master
KEP-3668: promote ServiceNodePortStaticSubrange to stable
2023-08-31 19:44:31 -07:00
Davanum Srinivas
fcff996909
adjust error message a bit
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-08-31 21:53:43 -04:00
Davanum Srinivas
889c8e919b
New repo who dis? distribution/reference
github.com/docker/distribution/reference has a new home github.com/distribution/reference

and a new tag v0.5.0. Let's switch to that.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-08-31 21:53:40 -04:00
Kubernetes Prow Robot
34aaf2b972
Merge pull request #120327 from liggitt/json-patch
Revert to json-patch 4.12.0
2023-08-31 17:06:30 -07:00
Jordan Liggitt
741f146157
Revert to json-patch 4.12.0 2023-08-31 19:01:37 -04:00
Kubernetes Prow Robot
6c1f6d55ad
Merge pull request #120263 from elmiko/enable-ccm-gce-ci
Use cloud-controller-manager by default on CI
2023-08-31 14:12:30 -07:00
Monis Khan
b10697c788
kmsv2: fix race in simpleCache.set when setting cache size metric
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-08-31 16:26:58 -04:00
Antonio Ojea
8f6a79b29f use external cloud provider by default with gce
This change enables the external cloud provider by default for GCE
infrastructure. It is the result of several squashed commits, these are
their commit messages:

* no longer need to enable endpoinslices controller since GA
* use external by default
* DisableKubeletCloudCredentialProviders
* temp test feature gates
2023-08-31 15:13:29 -04:00
Kubernetes Prow Robot
dd0c2d4eb1
Merge pull request #120108 from tnqn/fix-appgregator
Fix OpenAPI aggregation cleanup
2023-08-31 10:42:47 -07:00
ithrael
903156daa2 fix(test): add e2e-test for kubectl events filter by GroupVersion 2023-08-31 23:51:54 +08:00
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
Gunju Kim
696f84aeb0
Feature-gate SidecarContainers code in pkg/kubelet/kuberuntime 2023-09-01 00:13:47 +09:00
Gunju Kim
63177db32c
Add an e2e test for the pod sandbox changed scenario
This adds an e2e test to ensure that a pod should restart its containers
in right order after the pod sandbox is changed.
2023-09-01 00:13:47 +09:00
likakuli
e167ecbb9e fix: only invoke AddReference first time when to sync same pod to minimize unnecessary API requests to the API server for the configmap/secret get API
Signed-off-by: likakuli <1154584512@qq.com>
2023-08-31 22:56:49 +08:00
dairlair
3c5a58c5f8
Refactor checkErr func
I moved a simpler condition to the beginning of the function (when the error == nil). This has substantially streamlined the function for readability and comprehension of its logic flow.
2023-08-31 17:29:08 +03: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
Vincent Batts
f22d854072
unwanted-dependendencies: updating references, and jq
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-08-31 08:22:27 -04: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
Vincent Batts
3bc6ee6fef
unwanted-dependencies: sort this list
Seperated this commit from the prior, to keep it clear the additions.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-08-30 21:50:31 -04:00
Vincent Batts
eb5695b0c5
unwanted-dependencies: adding archived repos
Ref: #120276

This is a first step, and then we'll work to clean the code next.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-08-30 21:49:17 -04:00
Anish Ramasekar
15c02f2a03
add integration tests
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-08-30 23:14:59 +00:00
Anish Ramasekar
9e1ff1e512
add loading config and wire feature flag
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-08-30 23:14:56 +00:00
Jefftree
57b27fd3cd Fallback to legacy discovery on a wider range of conditions in aggregator 2023-08-30 16:10:51 -04: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
Dan Winship
04f0b4a014 Bump CloudDualStackNodeIPs to beta for 1.29 2023-08-30 13:22:39 -04:00
Todd Neal
46cb538642 OWNERS_ALIASES: add tzneal to sig-node-reviewer 2023-08-30 11:53:23 -05:00
Quan Tian
bf41b0462c Fix OpenAPI aggregation cleanup
There were four issues in OpenAPI aggregation cleanup:
1. When removing an APIService, openAPIAggregationController was called
   twice while openAPIV3AggregationController was never called, leading
   to OpenAPI v3 for the APIService not cleaned up.
2. When removing a local APIService, v2 specAggregator should not return
   ErrAPIServiceNotFound when it doesn't find the APIService because
   local APIServices were never added to its cache, otherwise confusing
   error logs would be generated. Besides, the method's comment
   indicates that the desired behavior is that no error is returned if
   the APIService does not exist.
3. When removing an APIService, v3 specProxier should update
   openapiv2converter's cache, like when updating an APIService,
   otherwise the API would not be removed from "/openapi/v3".
4. When v3 AggregationController reconciles an APIService, it should
   stop requeueing it if it fails with ErrAPIServiceNotFound as the
   APIService has been removed, like what v2 AggregationController does,
   otherwise it would keep reconciling the APIService forever.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-08-31 00:01:14 +08: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
SataQiu
2825519da2 apf: remove v1alpha1 API 2023-08-30 20:48:42 +08: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