Commit Graph

2285 Commits

Author SHA1 Message Date
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
wojtekt
6663414a1f Autogenerated code
Kubernetes-commit: 7b6bcdf780b778af3df5c133686ccb18d8c38fa0
2019-10-24 14:09:51 +02:00
wojtekt
ac8adc6f4c Cleanup explicitly registered functions
Kubernetes-commit: d7011f1bdbee285cdfc9bdb0f5b0716f4e02adfd
2019-10-24 13:18:31 +02:00
Wenjia Zhang
6c8f3ca2c6 Pin dependencies and update vendors
Kubernetes-commit: 660b17d0aeda96af94defd4c5110d9fef523d52b
2019-10-23 13:37:36 -07:00
Kubernetes Publisher
464ec5ba04 Merge pull request #82365 from jkaniuk/pod-gc
Pod GC controller - use node lister

Kubernetes-commit: 2c4cba8aa0fb6db7dbf7ba1c8cb57f1245eb409c
2019-10-24 10:59:28 +00:00
Jacek Kaniuk
d81654af9d pkg/util/workqueue/delaying_queue: export contructor with custom clock
Kubernetes-commit: 638c02f6cdb4e269f46b60fe1f91e553cfc59749
2019-10-23 16:07:38 +02:00
yue9944882
808ced1183 [generated] ./hack/update-all.sh
generated

generated

generated

rule

generated

generated

Kubernetes-commit: 6db3edff108c568a20688e575be4164768836cd7
2019-10-23 15:17:55 +08:00
Kubernetes Publisher
d1b30110f1 Merge pull request #83857 from mrbobbytables/update-client-go-owners
Prune inactive owners from staging/src/k8s.io/client-go/* OWNERS files.

Kubernetes-commit: 9c70e39b204e42bbea0b4cf744595a5af3006f70
2019-10-23 06:59:29 +00:00
sshukun
cd92d91e0f Fix typo in k8s.io/client-go/tools/cache/index.go
Kubernetes-commit: a0d3e6750ecbc67d017c2c67d0ff6f12e1b0c1f1
2019-10-21 13:30:45 +09:00
Michelle Au
69cd73bcf4 generated files
Kubernetes-commit: 9268d4053928488ea58829484bd59537b89da205
2019-10-18 18:09:02 -07:00
Kubernetes Publisher
14c42cd304 Merge pull request #83945 from barkbay/fix-83895
Fix memory and timer leak in work queue

Kubernetes-commit: cd7a0ee8eba749551366c082c15e54aed407d101
2019-10-16 23:02:10 +00:00