Commit Graph

2964 Commits

Author SHA1 Message Date
Jordan Liggitt
61471be615 Deflake ThrottledLogger test
Kubernetes-commit: c84df5d66ea8d949374b67c5205b9869b984ea84
2020-11-19 13:59:27 -05:00
Kubernetes Publisher
66db254099 Merge pull request #95981 from caesarxuchao/http2-healthcheck
Enables HTTP/2 health check

Kubernetes-commit: afeac926fa79179bfd0c5e718459086845a2a80c
2020-11-18 00:58:04 +00:00
Kubernetes Publisher
7c9ea22f76 Merge pull request #92743 from liggitt/gc
Fix GC uid races and handling of conflicting ownerReferences

Kubernetes-commit: e1ab99e0d662f3d9bf89ccf48f71444dbabce37e
2020-11-17 12:14:06 -08:00
Bryan Boreham
5d2c89de53 Remove unused argument from generateEvent
Kubernetes-commit: beceee68156dff8b10123a37bb4645941b7df0c2
2020-11-17 16:51:10 +00:00
xiongzhongliang
d7ba1f2e01 use klog.Info and klog.Warning when had no format
Kubernetes-commit: 90f4aeeea4cc5f96caa6ed87c67ca7e62d1ba21c
2020-11-14 00:55:06 +08:00
Chao Xu
8dde295de4 Add a unit test testing the HTTP/2 health check help the REST client
detects broken TCP connections.

Kubernetes-commit: ba7b1f7a89ffed78115ab0229b7504d05f6c7d48
2020-10-29 23:03:14 -07:00
Haowei Cai
7dddf976b8 fix the fake client example: how to handle a race between the fake client and informer
Note that the fake client isn't designed to work with informer. It
doesn't support resource version. It's encouraged to use a real client
in an integration/E2E test if you need to test complex behavior with
informer/controllers.

Kubernetes-commit: 942bc9b32e39bb9c6ca045c02b48cc84dfa86633
2020-10-26 22:50:32 -07:00
Solly Ross
726d27fe7a Don't record events in goroutines
This changes the event recorder to use the equivalent of a select
statement instead of a goroutine to record events.

Previously, we used a goroutine to make event recording non-blocking.
Unfortunately, this writes to a channel, and during shutdown we then
race to write to a closed channel, panicing (caught by the error
handler, but still) and making the race detector unhappy.

Instead, we now use the select statement to make event emitting
non-blocking, and if we'd block, we just drop the event.  We already
drop events if a particular sink is overloaded, so this just moves the
incoming event queue to match that behavior (and makes the incoming
event queue much longer).

This means that, if the user uses `Eventf` and friends correctly (i.e.
ensure they've returned by the time we call `Shutdown`), it's
now safe to call Shutdown.  This matches the conventional go guidance on
channels: the writer should call close.

Kubernetes-commit: e90e67bd002e70a525d3ee9045b213a5d826074d
2020-10-16 15:05:00 -07:00
Jordan Liggitt
c476b49dcf Add GC unit tests
Adds unit tests covering the problematic scenarios identified
around conflicting data in child owner references

                      Before   After
package level         51%      68%
garbagecollector.go   60%      75%
graph_builder.go      50%      81%
graph.go              50%      68%

Added/improved coverage of key functions that had lacking unit test coverage:

* attemptToDeleteWorker
* attemptToDeleteItem
* processGraphChanges (added coverage of all added code)

Kubernetes-commit: e491c3bc7056530d82590d95f0af0e8c4d8dded5
2020-10-09 17:50:52 -04:00
Kubernetes Publisher
77eda6a939 Merge pull request #96317 from Jefftree/test-ssa
Integrate defaults marker to defaulter-gen

Kubernetes-commit: 05d1b94a701d807666b40665f5728e0cc5f92054
2020-11-14 08:57:41 +00:00
Kubernetes Publisher
76f48268c7 Merge pull request #96527 from adtac/apfbeta
promote API priority and fairness types and APIs to beta

Kubernetes-commit: 36f571404fcb136011024b89efaa2a0d089acd5f
2020-11-14 04:57:47 +00:00
Kubernetes Publisher
4ab8fb4585 Merge pull request #96425 from bobbypage/vendor-cadvisor-v0.38
Vendor cadvisor v0.38.4

Kubernetes-commit: 41533ecec8966636554faba44368a36d5d6c5347
2020-11-14 00:58:07 +00:00
David Porter
4bbb204f15 vendor: cadvisor v0.38.4
Kubernetes-commit: 8af7405f1730c4913c48c6dc494e319cb3015f69
2020-11-13 19:52:57 +00:00
Kubernetes Publisher
d396fd99eb Merge pull request #96549 from caesarxuchao/net-sys-dep-update
update golang.org/x/net and golang.org/x/sys

Kubernetes-commit: 85cd7c530bf55cd369bdcb92a5a31d3d1547113f
2020-11-13 17:06:34 +00:00
Kubernetes Publisher
759e1a8119 Merge pull request #95614 from wilsonehusin/golint-client-go-transport
Fix golint failures in client-go/transport

Kubernetes-commit: 3b2746c9ea9e0fa247b01dca27634e509b385eda
2020-11-13 17:06:31 +00:00
Chao Xu
26433c83c0 update golang.org/x/net and golang.org/x/sys
Kubernetes-commit: 7b26cff1740ecfb8e6ac184539d1cb5dd66991c2
2020-11-13 05:15:22 +00:00
Kubernetes Publisher
30548acd0a Merge pull request #96001 from serathius/datapolicy-client-go
Add datapolicy tags to staging/src/k8s.io/client-go/

Kubernetes-commit: f4a156eb29d51b73f52d69ab4c5f96e440eebc41
2020-11-12 20:25:28 +00:00
Antoine Pelisse
96c6b1c8c8 Update kube-openapi
Kubernetes-commit: 8cce122e7b6506b361032869f7115635f13ca96a
2020-11-10 15:09:03 -08:00
yue9944882
8ff8f8a3c2 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>

Kubernetes-commit: 849be447f563fc93a27a0827fb1185b885b57114
2020-11-04 16:33:14 +08:00
Marek Siarkowicz
e93788d387 Add datapolicy tags to staging/src/k8s.io/client-go/
Kubernetes-commit: e29c568c4a9cd45d15665345aa015e21bcff52dd
2020-10-29 18:15:52 +01:00
Kubernetes Publisher
04f89d4efe Merge pull request #95718 from SergeyKanzhelev/runtimeClass2
RuntimeClass GA

Kubernetes-commit: 12d9183da03d86c65f9f17e3e28be3c7c18ed22a
2020-11-12 12:25:17 +00:00
Sergey Kanzhelev
381d44651b GA of RuntimeClass feature gate and API
Kubernetes-commit: 06da0e5e74a99d5c6c2f4e120b2cd0c2c6f3caf4
2020-11-11 19:22:32 +00:00
Kubernetes Publisher
bef66adadf Merge pull request #95954 from sttts/sttts-go-openapi
apiextensions: replace go-openapi with kube-openapi fork for validation

Kubernetes-commit: 0cba30d891cb77e813d7f19dcc5ae422076fcfe3
2020-11-09 16:25:15 +00:00
Dr. Stefan Schimanski
be00baa5eb bump(k8s.io/kube-openapi)
Kubernetes-commit: dd1709ba46580af290712b0eca12acd00a78789d
2020-11-06 10:59:34 +01:00
Kubernetes Publisher
a2cda5636d Merge pull request #96279 from cmluciano/cml/netutilsipv4
dualstack: cleanup IsIPv4 duplicates in favor of k8s/utils functions

Kubernetes-commit: 151c2799d1d76ae6a9847b89bdf912604477c2d5
2020-11-07 12:24:55 +00:00
Kubernetes Publisher
9950c71bb5 Merge pull request #74363 from aanm/fix-client-go-metrics
client-go/rest: fix finalURLTemplate for url base == "/"

Kubernetes-commit: 80c2f61939fb01720e6d96021cc3cd8c909bf34d
2020-11-06 00:29:52 +00:00
Christopher M. Luciano
1a0a999839 dualstack: incorporate IsIPv4 updates from utils repo
This dependency bump will allow for cleanup of duplicate code in
the dualstack e2e tests.

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>

Kubernetes-commit: 5303b3fbbd52f5092bdcbd3765347eb218485ca5
2020-11-05 14:25:23 -05:00
Kubernetes Publisher
1eb2027cd5 Merge pull request #96020 from deads2k/dynamiclist
update fake dynamic client to return GVK

Kubernetes-commit: dbd2be08fb0515599aadb897e0c1476abc8b2552
2020-11-05 04:24:28 +00:00
Kubernetes Publisher
bcecfeab18 Merge pull request #93293 from soltysh/loading_precedence
kubeconfig: add explicit path, if specified to loading precedence

Kubernetes-commit: 583d01a9bfc0c403bc8e1043f7046f1c8b5d7881
2020-11-05 00:24:32 +00:00
Kubernetes Publisher
68bb4a9525 Merge pull request #96154 from rf232/update_klog
Update Klog dependency

Kubernetes-commit: 3f6ec26eefcae1cdb4a43aa4e664a5f60fc7ca78
2020-11-04 16:24:36 +00:00
Rob Franken
01777546cc Update Klog dependency
Updating Klog to pickup changes needed for log sanitization.

(https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1753-logs-sanitization)

Kubernetes-commit: c6685436fdae6fbb8ac7083b85ecfd47b5871e68
2020-11-03 20:16:25 +01:00
Kubernetes Publisher
534b10dd04 Merge pull request #95933 from brianpursley/kubernetes-95882
Fix bug in JSON path parser where an error occurs when a range is empty

Kubernetes-commit: cd99c63570eb1489dd631c12ea86db708dbdcd59
2020-11-03 12:24:46 +00:00
Kubernetes Publisher
4ef01cd5e2 Merge pull request #96108 from liggitt/revert-sys
Revert "Updated golang/x/net. Also updated golang.org/x/sys"

Kubernetes-commit: 770525fd3d47a1ef86aab886b62b73b3557457d5
2020-11-02 20:24:40 +00:00
Jordan Liggitt
3b0c685ad9 Revert "Updated golang/x/net. Also updated golang.org/x/sys"
Kubernetes-commit: 4012fb005205a2f6dbd2534d600c4f784b5c0210
2020-11-02 08:28:24 -05:00
Kubernetes Publisher
852de461ed Merge pull request #96076 from caesarxuchao/update-deps
Updates golang/x/net and golang/x/sys

Kubernetes-commit: a0d23de0861d5a2fc446c417bf0c53fa1f51706e
2020-11-01 20:23:56 +00:00
brianpursley
135cef183c Fix bug in JSON path parser where an error occurs when a range is empty
Kubernetes-commit: 10634c6093c84acc78181a26c93d8785e12802e4
2020-11-01 10:41:19 -05:00
Chao Xu
285943f1c0 Updated golang/x/net. Also updated golang.org/x/sys, as required by
hack/lint-dependencies.sh.

Kubernetes-commit: ec6e2321261b900089183ac61f1ac0040be5fa9c
2020-10-31 16:21:08 -07:00
Kubernetes Publisher
0c53f2fd3c Merge pull request #95489 from ankeesler/ankeesler/enj/f/exec_plugin_cluster
exec credential provider: wire in cluster info (superset of #91192)

Kubernetes-commit: 53913a7c676c4bd21d6d3a58e6d6305729abaa9b
2020-10-30 04:24:07 +00:00
Andrew Keesler
078729a26c exec credential provider: exec -> client.authentication.k8s.io/exec
Hopefully we've fixed all of these references now...

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 409f22832a9f949e7fa534379574ce4fb9802394
2020-10-29 17:02:55 -04:00
David Eads
20c034c178 add GVK to fake dynamic client to match actual behavior
Kubernetes-commit: f4383458432cd67714e9ce0acde56a2ed5c24a21
2020-10-29 15:53:34 -04:00
David Eads
75ef13ec60 demonstrate existing generated client and fake client behavior is consistent
Kubernetes-commit: eaac8b80cabdccd0cbb35ef2d33a4f6628263c01
2020-10-29 15:12:38 -04:00
Andrew Keesler
405010f17b exec credential provider: k8s.io/client-go/tools/auth/exec helper
Exec plugin implementations should be able to call
LoadExecCredentialFromEnv() in order to get everything they need to
operate (i.e., cluster information (as long as it is passed in) and
optionally per-cluster configuration).

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 875a46bd7c1b79f1fae9cd189eec5fc9c3fbf1bc
2020-10-29 13:38:50 -04:00
Andrew Keesler
a7ba87c612 exec credential provider: ProvideClusterInfo and kubeconfig shadow
- The main idea here is that we want to 1) prevent potentially large CA
  bundles from being set in an exec plugin's environment and 2) ensure
  that the exec plugin is getting everything it needs in order to talk to
  a cluster.
- Avoid breaking existing manual declarations of rest.Config instances by
  moving exec Cluster to kubeconfig internal type.
- Use client.authentication.k8s.io/exec to qualify exec cluster extension.
- Deep copy the exec Cluster.Config when we copy a rest.Config.

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: c4299d15d5289768808034676858e76a177eeae5
2020-10-29 13:38:42 -04:00
Kubernetes Publisher
e84213f91f Merge pull request #95939 from dprotaso/leaderelection-release
Address scenario where releasing a resource lock fails if a prior update fails or gets cancelled

Kubernetes-commit: 8bc8b11bcf5d970d678e28679c1699e2383610b8
2020-10-29 00:23:46 +00:00
Kubernetes Publisher
d58491a0a7 Merge pull request #95923 from deads2k/remove-deprecated
remove the deprecated client that we stopped generating

Kubernetes-commit: ec0ef235990a1ceda22d78d96c129677e5aa097c
2020-10-28 20:24:06 +00:00
Kubernetes Publisher
3ced13b9a4 Merge pull request #95117 from andrewsykim/fake-dynamic-list
fake dynamic client: document that List does not preserve TypeMeta in UnstructuredList

Kubernetes-commit: c5ecae737d2eb668adab12cefa3644f550fc9e8a
2020-10-28 04:23:41 +00:00
Andrew Sy Kim
1db2969ba9 fake dynamic client: support *List kinds
Today the dynamic fake client is not aware of *List kinds, so List calls return UnstructuredList
objects without TypeMeta. This patch updates client-go's fake object tracker to store a map of
GVR to list GVKs. In this way, the list GVK can be set for UnstructuredList objects.

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

Kubernetes-commit: 0845b863e89912e0d6c4380f8bc362646326386a
2020-10-27 23:08:46 -04:00
Dave Protasowski
3da398aea9 Re-add the event recorder in the release test
Prior having a mock recorder would cause panics since the lock
would be set to nil on update failures. Now the recorder will
use the cached lock

Kubernetes-commit: 5e7ed7b86d26b651f1ef78a794cdc03fa945a3ce
2020-10-27 22:45:33 -04:00
Dave Protasowski
bfd1732c49 Don't clear the cached resourcelock when errors occurs on updates
This allows the lock to be release normally - even with a
potentially stale lock. This flow should only occur when we're
the lease holders.

Kubernetes-commit: 8160ecfd90284c333101a16bdccd79aacc86360d
2020-10-27 22:41:39 -04:00
Dave Protasowski
a0a4a352aa Add failing test showing release is not working properly
Kubernetes-commit: 23ce312b9f764736d8ac7cb6f8ebf6825d43f817
2020-10-27 22:29:22 -04:00