Commit Graph

2295 Commits

Author SHA1 Message Date
Kubernetes Publisher
1924198484 Merge pull request #84390 from robscott/endpointslice-beta
Promoting EndpointSlices to beta

Kubernetes-commit: 64f4be5b328a4df8a709b95604743086013a70e4
2019-11-14 10:07:05 +00:00
Kubernetes Publisher
1f4f5fa64a Merge pull request #85004 from deads2k/dynamic-agg-cert
dynamic reload cluster authentication info for aggregated API servers

Kubernetes-commit: 02af1dd62c4842e20e2ee7337edf032327b1c8ed
2019-11-14 10:07:03 +00:00
Kubernetes Publisher
74d7a2e0eb Merge pull request #85134 from LukeShu/lukeshu/event-docs-non-api
client-go/tools: Docs: Clarify what's "old" core/v1 and what's "new" events/v1beta1

Kubernetes-commit: 760af28f69a7cf7090abeca59e1e0703d161ace8
2019-11-14 10:07:00 +00:00
Kubernetes Publisher
5971a24b40 Merge pull request #84970 from atlassian/pdzwart/kubernetes/kubernetes/84959
- Delete backing string set from a threadSafeMap index when the string set length reaches 0.

Kubernetes-commit: 41be6d65d88728f443966da83b62d545684576ab
2019-11-14 10:06:59 +00:00
Jordan Liggitt
d3ab799453 Add comments to explain golang.org replace directives
Kubernetes-commit: 9f40e19d7ac9e2203c23814701468a26eee1964f
2019-11-12 23:54:26 -05:00
Luke Shumaker
f5d68cde58 client-go/tools: Docs: Clarify what's "old" core/v1 and what's "new" events/v1beta1
Kubernetes-commit: 2c4bb0fa4db88462a61995d9179fad801b00d69d
2019-11-12 08:30:24 -05:00
Kubernetes Publisher
dac3b9c76a Merge pull request #80284 from danielqsj/exec
Fix a racing issue in client-go UpdateTransportConfig

Kubernetes-commit: 48ddf3be87789c92e6824c9ce536c76d008f5c19
2019-11-12 10:08:11 +00:00
Kubernetes Publisher
a56922bade Merge pull request #84692 from smarterclayton/protocol_errors
Fix watch negotiation when using a non-default mime type in the client

Kubernetes-commit: c28921f248a8e6c923096154c6e87efcc188b9f0
2019-11-11 06:10:43 +00:00
Clayton Coleman
9bbcc2938d Always negotiate a decoder using ClientNegotiator
This commit performs two refactors and fixes a bug.

Refactor 1 changes the signature of Request to take a RESTClient, which
removes the extra copy of everything on RESTClient from Request. A pair
of optional constructors are added for testing. The major functional
change is that Request no longer has the shim HTTPClient interface and
so some test cases change slightly because we are now going through
http.Client code paths instead of direct to our test stubs.

Refactor 2 changes the signature of RESTClient to take a
ClientContentConfig instead of ContentConfig - the primary difference
being that ClientContentConfig uses ClientNegotiator instead of
NegotiatedSerializer and the old Serializers type. We also collapse
some redundancies (like the rate limiter can be created outside the
constructor).

The bug fix is to negotiate the streaming content type on a Watch()
like we do for requests. We stop caching the decoder and simply
resolve it on the request. We also clean up the dynamic client
and remove the extra WatchSpecificVersions() method by providing
a properly wrapped dynamic client.

Kubernetes-commit: 3b780c64b89606f4e6b21f48fb9c305d5998b9e5
2019-11-10 16:52:08 -05:00
Pete de Zwart
ab63be7642 - Delete backing string set from a threadSafeMap index when the string set length reaches 0.
- Added thread_safe_store_test exercising new index backing string set delete at 0 functionality.

- TestThreadSafeStoreDeleteRemovesEmptySetsFromIndex logic nesting inverted.

- Added test case for usage of an index where post element delete there is non-zero count of elements and expect the set to still exist.

- Fixed date.

- Fixed awprice nits.

- Fix bazel.

Kubernetes-commit: 29a051388a719e0359969b8431de8e38e955e2a6
2019-11-08 16:57:06 +11:00
Ryan Phillips
52589237eb kubelet: add certificate rotation error metric
Kubernetes-commit: 8e50c55e6bf715d9067376a9e7f136ffacb0a3ee
2019-11-05 16:51:40 -06:00
David Eads
7a5b91a7ca dynamic reload cluster authentication info for aggregated API servers
Kubernetes-commit: 3aede35b3b042e8a626e8fb9e1e181e73cd29d0a
2019-11-04 13:46:28 -05:00
David Eads
4bda71482c create utilities inspecting server TLS certs
Kubernetes-commit: e44352f31a8d506d77d2757dbb354fd539826c92
2019-11-12 10:10:26 -05:00
Clayton Coleman
881cd219a8 dynamic: The dynamic client no longer needs a special cased watch
By correctly handling content type negotiation, we can avoid the
need for a special version of watch and use the same code path as
typed clients.

Kubernetes-commit: 3f94f80b0a79293e54d7080aaf7a64d7df8b1d4a
2019-11-03 15:10:12 -05:00
matte21
ce6197e865 Fix error in periodic resyncs description
Make it clear that periodic resyncs fire update notifications, not
create notifications as the old comments incorrectly stated.

Kubernetes-commit: 3ae8c864de24a2ad42321c9cbd71099a2b6dcef3
2019-10-28 14:23:37 +01:00
matte21
85843e6e02 Clarify that OnUpdate can mask delete and recreate
Kubernetes-commit: ff543ddfc09adf3d0abdf42f9d9fbd57c3ab4b43
2019-10-28 14:12:22 +01:00
Rob Scott
370c449f1e Promoting EndpointSlices to beta
Kubernetes-commit: a7e589a8c689d1a6c0c21d47c5e6c97267822875
2019-10-25 14:59:10 -07:00
Suresh Kumar Ponnusamy
6a6b2af8ea Support TLS Server Name overrides in kubeconfig file
Signed-off-by: Suresh Kumar Ponnusamy <suresh.ponnusamy@freshworks.com>

Kubernetes-commit: 37c81ed79ac6836bce4b96f888aa407dc18d747c
2019-08-28 10:51:14 +05:30
Robert Krawitz
c02e303b36 Report api request throttling at v=3
Kubernetes-commit: e7cc2c2d280f319b78462a37d32c5c7f1e6e5567
2019-07-26 12:59:34 -04:00
danielqsj
0dd469e42b Fix data race in client-go UpdateTransportConfig
Kubernetes-commit: 7518a44b18d8b225a9572f1e0c902776eb4a6eb0
2019-07-18 12:46:03 +08:00
Jack Kleeman
a493c8da9a Add ReloadCertFromDisk flag to rest.Config and to kubeconfig which allows the provided client certificate files to be reloaded from disk (currently on every use)
Close outbound connections when using a cert callback and certificates rotate. This means that we won't get into a situation where we have open TLS connections using expires certs, which would get unauthorized errors at the apiserver

Attempt to retrieve a new certificate if open connections near expiry, to prevent the case where the cert expires but we haven't yet opened a new TLS connection and so GetClientCertificate hasn't been called.

Move certificate rotation logic to a separate function

Rely on generic transport approach to handle closing TLS client connections in exec plugin; no need to use a custom dialer as this is now the default behaviour of the transport when faced with a cert callback. As a result of handling this case, it is now safe to apply the transport approach even in cases where there is a custom Dialer (this will not affect kubelet connrotation behaviour, because that uses a custom transport, not just a dialer).

Check expiry of the full TLS certificate chain that will be presented, not only the leaf. Only do this check when the certificate actually rotates. Start the certificate as a zero value, not nil, so that we don't see a rotation when there is in fact no client certificate

Drain the timer when we first initialize it, to prevent immediate rotation. Additionally, calling Stop() on the timer isn't necessary.

Don't close connections on the first 'rotation'

Remove RotateCertFromDisk and RotateClientCertFromDisk flags.

Instead simply default to rotating certificates from disk whenever files are exclusively provided.

Add integration test for client certificate rotation

Simplify logic; rotate every 5 mins

Instead of trying to be clever and checking for rotation just before an
expiry, let's match the logic of the new apiserver cert rotation logic
as much as possible. We write a controller that checks for rotation
every 5 mins. We also check on every new connection.

Respond to review

Fix kubelet certificate rotation logic

The kubelet rotation logic seems to be broken because it expects its
cert files to end up as cert data whereas in fact they end up as a
callback. We should just call the tlsConfig GetCertificate callback
as this obtains a current cert even in cases where a static cert is
provided, and check that for validity.

Later on we can refactor all of the kubelet logic so that all it does is
write files to disk, and the cert rotation work does the rest.

Only read certificates once a second at most

Respond to review

1) Don't blat the cert file names
2) Make it more obvious where we have a neverstop
3) Naming
4) Verbosity

Avoid cache busting

Use filenames as cache keys when rotation is enabled, and add the
rotation later in the creation of the transport.

Caller should start the rotating dialer

Add continuous request rotation test

Rebase: use context in List/Watch

Swap goroutine around

Retry GETs on net.IsProbableEOF

Refactor certRotatingDialer

For simplicity, don't affect cert callbacks

To reduce change surface, lets not try to handle the case of a changing
GetCert callback in this PR. Reverting this commit should be sufficient
to handle that case in a later PR.

This PR will focus only on rotating certificate and key files.
Therefore, we don't need to modify the exec auth plugin.

Fix copyright year

Kubernetes-commit: 929b1559a0b855d996257ab3ad5364605edc253d
2019-06-14 22:08:58 +01:00
danielqsj
51f3d77844 clean SinceInMicroseconds, convert to SinceInSeconds
Kubernetes-commit: ab182552b485ceed96c3b05d284ae9480377daf8
2019-04-15 16:18:01 +08:00
Clayton Coleman
4b146a95cd Remove deprecated-dynamic client
It is now unused.

Kubernetes-commit: c416ee584c178bb89c6cd11c93b504f2098fac0f
2019-02-12 00:31:54 -05:00
Kubernetes Publisher
3c0d1af94b Merge pull request #83840 from liggitt/json-iter
bump json-iterator dependency

Kubernetes-commit: 3387d6cfc73235fd554e5039b85abb7700eaf126
2019-11-09 10:22:09 +00:00
Kubernetes Publisher
f8f007fd45 Merge pull request #84911 from yue9944882/chore/bump-kube-openapi
Pin kube-openapi vendor to 30be4d16710a

Kubernetes-commit: dd6faa5da791c06fa23ff668e4463c3ad2b23340
2019-11-08 07:01:06 +00:00
Kubernetes Publisher
e55a71a3e0 Merge pull request #82705 from deads2k/agg-authn-publish
use controller to publish cluster authentication info

Kubernetes-commit: a5fe905be420d518892e8e8b682902deef82d1c6
2019-11-07 19:01:07 +00:00
yue9944882
656c97889d update k8s.io/kube-openapi to 30be4d16710a
Kubernetes-commit: 8e7606f32898b294fc25152ff8bd34f62d6221d3
2019-11-07 18:39:08 +08:00
Kubernetes Publisher
a537b3b527 Merge pull request #83520 from jpbetz/reflector-relist-rv
Avoid going back in time in Reflector relist (revived)

Kubernetes-commit: 8ed2f4775a0d2b13c4be790cdfc1f34bc8b6522b
2019-11-07 03:03:46 +00:00
Kubernetes Publisher
6f1579c35d Merge pull request #82809 from liggitt/go-1.13-no-modules
update to use go1.13.4

Kubernetes-commit: 695c3061dd92a6b6950f8adf0341ceb4a8dd44d7
2019-11-07 03:03:44 +00:00
Jordan Liggitt
d4d115c905 hack/update-vendor.sh
Kubernetes-commit: 297570e06a88db23e16dbdbf6ce3173fe0ae376c
2019-11-05 14:11:10 -05:00
Kubernetes Publisher
a57d0056db Merge pull request #84807 from clarklee92/ModifyTheStatusCode
Modify the status code number to HTTP status semantics

Kubernetes-commit: 43b102a83cc1d2b97a6a59f1c14967a840df2c35
2019-11-06 23:00:57 +00:00
Kubernetes Publisher
d7ea50d263 Merge pull request #84801 from mikedanese/lebug
Fix panic on configmap and lease lock implementations

Kubernetes-commit: 17d99dfbbee90b1889427874589423e4836d7108
2019-11-06 07:00:52 +00:00
Kubernetes Publisher
d063930b33 Merge pull request #84139 from sshukun/fix-typo
Fix typo in k8s.io/client-go/tools/cache/index.go

Kubernetes-commit: d297780ff6e95308bbf8b0db5ab415825014859f
2019-11-06 07:00:50 +00:00
clarklee92
d3a5e5f798 Modify the status code number to HTTP status semantics
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
2019-11-06 00:45:35 +08:00
Kubernetes Publisher
52092c3c67 Merge pull request #83474 from msau42/topology-ga
CSI Topology ga

Kubernetes-commit: 1d1385af915098abd8bd23ab397ee0aeaa244f1e
2019-11-05 03:03:21 +00:00
Kubernetes Publisher
a7c4a955b2 Merge pull request #84534 from sambdavidson/serverRotMetric
Add a kubelet serving cert age metric

Kubernetes-commit: 0ed66351739608660fef27de55d8e0dff6570f28
2019-11-04 19:01:07 +00:00
Mike Danese
d46fe40533 also fix nil panic in lease and add tests for #84729
Kubernetes-commit: 7907b29551c7ef87bbe398ac02836b4c87246d3d
2019-11-04 10:40:48 -08:00
Ted Yu
93a8bb4af0 Prevent panic due to Annotations being nil map
Kubernetes-commit: c5792784e1ae689cb4c949b9c556ee1e4896064a
2019-11-04 10:04:31 -08:00
Kubernetes Publisher
890ae18798 Merge pull request #83671 from yue9944882/flow-control-api-model
Apiserver flowcontrol api models

Kubernetes-commit: 510fb38f275bdfbd61b2ceba5162209e88cf9634
2019-11-02 07:00:40 +00:00
Kubernetes Publisher
e9766ae820 Merge pull request #84604 from codenrhoden/update-utils-dep
Update k8s.io/utils dependency to latest

Kubernetes-commit: 97e28edb6620568d985f3b03b495a0a373aa8750
2019-11-01 23:00:44 +00:00
Kubernetes Publisher
940f075619 Merge pull request #84503 from wojtek-t/remove_conversion_funcs_2
Cleanup clientcmd api conversions

Kubernetes-commit: 07023f2a7f050fb6df5a552289bf3e7165eba94c
2019-11-01 19:03:46 +00:00
Travis Rhoden
ecaa2792f4 Update k8s.io/utils dependency to latest
Kubernetes-commit: 81f66ecbb5ff359ac765c7f332289dd8c1737c39
2019-10-31 08:35:01 -06:00
wojtekt
6ec083fb70 Autogenerated
Kubernetes-commit: c7916ca081682aaf07b3476f4facdb9695ddf498
2019-10-29 09:43:45 +01:00
wojtekt
62f256057d tags
Kubernetes-commit: 4096a0aa48ce83a7ac9dd791930f13fc9587f55c
2019-10-30 08:18:36 +01:00
wojtekt
cc78c193ee Cleanup clientcmd conversion
Kubernetes-commit: 328295c635449746ca83ac0fb2c9217491d59600
2019-10-29 09:30:27 +01:00
Kubernetes Publisher
1a481fb1e3 Merge pull request #83692 from yastij/fix-events-scheduler
add a fallback for kube-scheduler  when events.k8s.io is disabled

Kubernetes-commit: 486e2380bd2847f1af7f3c1d0c7b01e7e688415e
2019-10-28 23:03:19 +00:00
Samuel Davidson
7bd7ed8621 Added rotation metric to certificate manager
Kubernetes-commit: 7adb18120079016ed8aea1bd40e5cde161827a1d
2019-10-28 14:09:40 -07:00
Kubernetes Publisher
0bdba2f918 Merge pull request #84288 from wojtek-t/cleanup_conversions_registrations
Cleanup conversions registrations

Kubernetes-commit: d379ab2697251334774b7bd6f41b26cf39de470d
2019-10-26 06:59:34 +00:00
Kubernetes Publisher
f79cf5fbef Merge pull request #82794 from ingvagabund/fake-clientset-enforce-exact-much-for-get
Require exact match when calling Get method within fake clientset

Kubernetes-commit: cbf1e2d360698795e80bd4b80287149290f5919a
2019-10-25 22:59:29 +00:00
Kubernetes Publisher
af0e486466 Merge pull request #83987 from wenjiaswe/etcd_client_3_4_2
Update etcd client to v3.4.3 in k8s v1.17

Kubernetes-commit: 09f453ff8322979ed5a7611bc2e5528506c1fc7f
2019-10-25 22:59:28 +00:00