Commit Graph

4339 Commits

Author SHA1 Message Date
Sean Sullivan
0bc91705fa Tolerate empty discovery response in memcache client
Kubernetes-commit: a49f13258548c71194e3001ebf5fa219b88155d0
2023-02-22 23:59:37 +00:00
Sean Sullivan
bc1864f6cf Removes old discovery hack ignoring 403 and 404
Kubernetes-commit: 298cb361c85be02d6336437bde37c8a4ccf5583a
2023-02-17 12:47:05 -08:00
Sean Sullivan
0a3ea4f4da Refactor to use openapi fake client
Kubernetes-commit: e352d94e45cdd7f92574ac02e37fc3ab78a34798
2023-02-14 18:00:08 -08:00
Kubernetes Publisher
1ea719588e Merge pull request #115933 from intUnderflow/clean-up-fake-recorder
Clean up FakeRecorder event emission

Kubernetes-commit: b2a40948bdf18e622147a38421f4145b3302ae84
2023-02-22 01:05:51 +00:00
Lucy Sweet
3a78ee0346 Fix typo
Kubernetes-commit: 247299946bb424407590219729c4f16b073f1e4a
2023-02-21 22:05:02 +01:00
Lucy Sweet
1fc8a8a5a7 Clean up FakeRecorder event emission
Kubernetes-commit: 191fe47b6ca537040b22e56776bb97d3d21737e3
2023-02-21 20:35:54 +01:00
Kubernetes Publisher
269abfd8b0 Merge pull request #115860 from intUnderflow/include-annotations-fake-recorder
Allow inclusion of annotations in channel events when using FakeRecorder

Kubernetes-commit: 3a4583aeb6b66452fdfc7958fbc28d744805a63e
2023-02-21 21:05:39 +00:00
Lucy Sweet
c633a8222b Include annotations all the time
Kubernetes-commit: 8373afef0e0886fcd05a4cbf8b0bedeaa82a4d05
2023-02-21 16:42:37 +01:00
Lucy Sweet
f7f367ebae Respond to review
Kubernetes-commit: 7a48c6e2171d23fea76b7a15ab4971989f125b96
2023-02-21 16:29:38 +01:00
Kubernetes Publisher
dda9c5244f Merge pull request #115809 from seans3/openapi-file-client
New openapi v3 testing file client

Kubernetes-commit: 1c97dbc8c9096495706b1e141b0fe256ff3185e9
2023-02-17 21:05:23 +00:00
Kubernetes Publisher
d7a20b15ab Merge pull request #115472 from lanycrost/client-go-110992-GenerateSelfSignedCertKeyWithFixtures-permissions
client-go: make generating certificate/key permissions more restrictive (600)

Kubernetes-commit: 8014155cb5828d7d39905da68c3e2d39b1dab132
2023-02-17 21:05:21 +00:00
Lucy Sweet
a43f324cb9 Allow inclusion of annotations in channel events when using FakeRecorder
Kubernetes-commit: 9839ce96f557413f522230fa3e374e26356ae3d9
2023-02-17 16:38:10 +01:00
Khachatur Ashotyan
bd24c4230e client-go: change permissions of key
Kubernetes-commit: 49af62e64f33317ec0c12f9ed8ab8a0d4f365d44
2023-02-17 14:21:24 +04:00
Khachatur Ashotyan
a7dbbf8255 client-go: change permissions of GenerateSelfSignedCertKeyWithFixtures generated cert
Kubernetes-commit: 3cc99c5e77185ce26fd2d5513336e7229c5f7441
2023-02-17 11:20:39 +04:00
Khachatur Ashotyan
be82893604 client-go: change permissions of directories and certs
Kubernetes-commit: c941877438c2219318b0625f5b4e321efe324171
2023-02-17 11:16:46 +04:00
Kubernetes Publisher
d0008d188f Merge pull request #115620 from odinuge/ou-relist-missing-delete
client-go/cache: fix missing delete event on replace

Kubernetes-commit: 814faade7fa3916478df963cfc6e34042e79ce89
2023-02-17 01:05:14 +00:00
Kubernetes Publisher
df55688a24 Merge pull request #115604 from pacoxu/fix-design-proposals-links
old design proposals are now moved to Design Proposals Archive repo

Kubernetes-commit: ffe410bbb4e43ba7b7ceaec379709575e817d866
2023-02-16 21:05:13 +00:00
Paco Xu
4bd9226d28 API docs: point to current docs instead of archived designs
Kubernetes-commit: 3d536bd14bba0586f20d1d96560073e5d9e82f97
2023-02-16 15:29:56 +08:00
Sean Sullivan
1369f160e9 New openapi v3 testing file client
Kubernetes-commit: 195a55c84c1a0ba9dcc278cc1cccee320334d5e1
2023-02-15 11:37:08 -08:00
Kubernetes Publisher
60f5c9b463 Merge pull request #115786 from liggitt/net-0.7.0-master
Update golang.org/x/net to v0.7.0

Kubernetes-commit: b3d8ac8496a23d65a907f9333d906bcd5463764e
2023-02-15 10:47:27 +00:00
Kubernetes Publisher
249eb86644 Merge pull request #115785 from liggitt/fix-kubectl-test
Revert "Refactor fake versions of openapi client into testing subdir"

Kubernetes-commit: 98406e2a3e88bd6a2affe5674b7a577aa0926d48
2023-02-14 21:26:39 -08:00
Jordan Liggitt
e850f4518c Update golang.org/x/net to v0.7.0
Kubernetes-commit: f8e00778ddca11c08117ccf1d1c410641c70c428
2023-02-14 23:14:30 -05:00
Jordan Liggitt
fb55d97d70 Revert "Refactor fake versions of openapi client into testing subdir"
This reverts commit 869da89eab37ce670759cea2c86325f36625e7fc.

Kubernetes-commit: f98944590058f936c7adb76ea2c974899a460fe2
2023-02-14 22:14:37 -05:00
Kubernetes Publisher
278918a593 Merge pull request #115465 from seans3/openapi-client-testing
Refactor fake versions of openapi client into testing subdir

Kubernetes-commit: 08bbecb8e315fc976e35575e4e33c8a4a0e1cd28
2023-02-15 06:24:06 +00:00
Kubernetes Publisher
8ef4d7d4e8 Merge pull request #115685 from skitt/rest-req-error
client-go: add an Error() function on Request

Kubernetes-commit: 30f15671456283f37c3ed09412299b27cb92bcb4
2023-02-13 14:53:41 -08:00
Odin Ugedal
b2a4f028d6 client-go/cache: update Replace comment to be more clear
Since the behavior is now changed, and the old behavior leaked objects,
this adds a new comment about how Replace works.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 27f4bcae5c52a3bb88141f940ec23d907a15cde5
2023-02-13 11:23:50 +00:00
Odin Ugedal
a01b5a2a96 client-go/cache: rewrite Replace to check queue first
This is useful to both reduce the code complexity, and to ensure clients
get the "newest" version of an object known when its deleted. This is
all best-effort, but for clients it makes more sense giving them the
newest object they observed rather than an old one.

This is especially useful when an object is recreated. eg.

Object A with key K is in the KnownObjects store;
- DELETE delta for A is queued with key K
- CREATE delta for B is queued with key K
- Replace without any object with key K in it.

In this situation its better to create a DELETE delta with
DeletedFinalStateUnknown with B (with this patch), than it is to give
the client an DeletedFinalStateUnknown with A (without this patch).

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 7bcc3e00fc28b2548886d04639a2e352ab37fb55
2023-02-13 11:12:37 +00:00
Odin Ugedal
b250bf51ae client-go/cache: merge ReplaceMakesDeletionsForObjectsInQueue tests
Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: cd3e98b65c1339a8adc157175630de099a057d3f
2023-02-10 14:30:10 +00:00
Odin Ugedal
8279635aa4 client-go/cache: fix missing delete event on replace without knownObjects
This fixes an issue where a relist could result in a DELETED delta
with an object wrapped in a DeletedFinalStateUnknown object; and then on
the next relist, it would wrap that object inside another
DeletedFinalStateUnknown, leaving the user with a "double" layer
of DeletedFinalStateUnknown's.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 0bf0546d9f75d92c801e81c9f7adf040bba64102
2023-02-10 14:16:26 +00:00
Stephen Kitt
22e2a9b6b1 client-go: add an Error() function on Request
Requests can accumulate errors with no obvious indication, e.g. if
their primary purpose is to construct a URL: URL() itself doesn't
return an error if r.err is non-nil.

Instead of changing URL() to return an error, which has quite a large
impact, add an Error() function and indicate on URL() that it should
be checked.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: f69c1c47463ff70ad61adf6f38c4d5b7373e9d0a
2023-02-10 14:44:07 +01:00
Kubernetes Publisher
d46293369e Merge pull request #115665 from aramase/aramase/f/update_vendor_k8s_utils
Update k8s.io/utils to `a36077c30491`

Kubernetes-commit: 9a51625ebebcc8345c851afc2b5cc98eb19ac193
2023-02-10 01:08:12 +00:00
Anish Ramasekar
86a4c64374 Update k8s.io/utils to a36077c30491
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 09e02052fdf3d248368b3d05d5c922d616528c4c
2023-02-09 20:09:41 +00:00
Odin Ugedal
2ded6b6eb8 client-go/cache: fix missing delete event on replace
This fixes a race condition when a "short lived" object
is created and the create event is still present on the queue
when a relist replaces the state. Previously that would lead in the
object being leaked.

The way this could happen is roughly;

1. new Object is added O, agent gets CREATED event for it
2. watch is terminated, and the agent runs a new list, L
3. CREATE event for O is still on the queue to be processed.
4. informer replaces the old data in store with L, and O is not in L
  - Since O is not in the store, and not in the list L, no DELETED event
    is queued
5. CREATE event for O is still on the queue to be processed.
6. CREATE event for O is processed
7. O is <leaked>; its present in the cache but not in k8s.

With this patch, on step 4. above it would create a DELETED event
ensuring that the object will be removed.

Signed-off-by: Odin Ugedal <ougedal@palantir.com>
Signed-off-by: Odin Ugedal <odin@uged.al>

Kubernetes-commit: 25d77218acdac2f793071add9ea878b08c7d328b
2023-02-08 14:57:23 +00:00
Kubernetes Publisher
efd0415f67 Merge pull request #115514 from pohly/event-broadcaster-shutdown
client-go: don't wait too long after EventBroadcaster.Shutdown

Kubernetes-commit: b0171f77f68427813efbb478c0ba89f48322d34a
2023-02-08 13:07:28 +00:00
Paco Xu
878a4f8bbe archived design proposals are now moved to Design Proposals Archive Repo.
Kubernetes-commit: 019d2615af3f7fd0ed0d593ef9df348f6d85b204
2023-02-08 11:12:22 +08:00
Kubernetes Publisher
00b9d76f44 Merge pull request #115315 from enj/enj/i/kas_kubelet_conn_close
kubelet/client: collapse transport wiring onto standard approach

Kubernetes-commit: 22b88dea360b0aae4ecaa57142718386b3cbd40d
2023-02-07 17:07:30 +00:00
Kubernetes Publisher
9c5046523c Merge pull request #115379 from artemvmin/serial-mkfs
Add an option to limit the number of concurrent mkfs calls

Kubernetes-commit: 6eb008620cd0ee3501326ee003d47fbaf1fa5b52
2023-02-07 05:07:29 +00:00
Kubernetes Publisher
2e3265cc1d Merge pull request #108396 from tkashem/retry-metric
client-go: add a metric to count request retries

Kubernetes-commit: 2ab3151936f1df6b3ffb4d49bf9dc90218264545
2023-02-07 05:07:26 +00:00
Iceber Gu
899a109017 leaderelection: using le.clock for the time calculations
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>

Kubernetes-commit: 9c31f14a7cfea7cc793a9a3f98bdd117cb438316
2023-02-07 13:00:55 +08:00
Monis Khan
d8b14dc089 kubelet/client: collapse transport wiring onto standard approach
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 754cb3d601a820180d19567c3600a789d77b0f07
2023-02-05 20:51:54 -05:00
vinay kulkarni
85d57cfad9 Generated files and compat data from API changes
Kubernetes-commit: 3c70be1a1231e11c45698e209b01e91b92f8c5d2
2023-02-05 04:44:45 +00:00
Artem Minyaylov
13c89f7a54 Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex

Kubernetes-commit: f573e149423dc578284789fdff8eeb3c195b5ccf
2023-02-03 14:51:25 -08:00
Patrick Ohly
f6a5a1f139 client-go: don't wait too long after EventBroadcaster.Shutdown
When Shutdown was called, delivery of each pending event would still be retried
12 times with a delay of ~10s between each retry. In apiserver integration
tests that caused the goroutine to linger long after the corresponding
apiserver of the test was shut down.

Kubernetes-commit: 15b01af9c18a0840d71e2bb7dff4d8c29b158aad
2023-02-03 14:52:20 +01:00
Khachatur Ashotyan
71253f0b35 fix: comment about permission bits
Kubernetes-commit: fd17dcf3876458229ac15d426eb1bd58f8c52cb4
2023-02-03 13:40:33 +04:00
Khachatur Ashotyan
03568a1821 client-go: make generating certificate/key permissions more secure (600)
Kubernetes-commit: 5f81c3005f6d3aeb652a0626c3632ff68b036577
2023-02-02 14:52:45 +04:00
Sean Sullivan
bb1833cfed Refactor fake versions of openapi client into testing subdir
Kubernetes-commit: 869da89eab37ce670759cea2c86325f36625e7fc
2023-02-01 18:39:18 -08:00
Sean Sullivan
6eb57690dc OpenAPI V3 Root interface and basic implementation
Kubernetes-commit: 5b482476b1bb458b8206c122be045ced759550f2
2023-01-29 23:28:35 -08:00
Patrick Ohly
6a9f0eb8ac dependencies: update klog v2.90.1
This improves performance of the text formatting and ktesting.

Because ktesting no longer buffers messages by default, one unit
test needs to ask for that explicitly.

Kubernetes-commit: 961819a4d09488e20931103e0c36d2bed588fdcb
2023-01-23 18:19:54 +01:00
Iceber Gu
b4217e149b client-go: fix the wait time for trying to acquire the leader lease
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>

Kubernetes-commit: 9d80516abb4244ac1df4ceb84a32d3204fe5b308
2023-01-10 13:09:07 +08:00
Antoine Pelisse
e2867f9cdc Update kubernetes code for minor API changes to kube-openapi
Kubernetes-commit: 88ec8fba32f0ef7b768ec528cfbe44046877ea34
2022-12-29 12:12:33 -08:00