Commit Graph

220 Commits

Author SHA1 Message Date
Renaud Gaubert
11fef8ba3b Pluginwatcher should prevent kubelet from starting if we cannot watch the plugin root 2018-11-09 00:20:22 +00:00
Renaud Gaubert
3a467ff44b Pluginwatcher: log error when walking fs rather than fail 2018-11-08 23:22:07 +00:00
Renaud Gaubert
3f5039a2d1 Fix pluginwatcher panic on failed startup 2018-11-08 23:22:07 +00:00
k8s-ci-robot
3b66adb8bc Merge pull request #68562 from RenaudWasTaken/pluginwatcher-doc
Update pluginwatcher doc
2018-11-01 17:31:29 -07:00
qingsenLi
3ac9b27b2a remove repetitive word in annotation 2018-11-02 00:54:41 +08:00
Nikhita Raghunath
6285db6576 Add license header to non-generated proto files 2018-10-30 22:29:07 +05:30
Pengfei Ni
053b71d5d2 Switch windows runtime endpoints to npipe 2018-10-22 21:28:36 +08:00
Joe Betz
4263c75211 Update etcd client to 3.3.9 2018-10-08 13:34:34 -07:00
Renaud Gaubert
79056292aa Update pluginwatcher doc 2018-09-24 15:11:21 +02:00
Renaud Gaubert
63436ab4a3 Renamed pluginwatcher README to README.md 2018-09-21 16:25:33 +02:00
fisherxu
89f3fa3d62 use dailcontext 2018-09-08 16:07:38 +08:00
Renaud Gaubert
29d225e90c Update pluginwatcher tests 2018-09-06 14:44:03 +02:00
Renaud Gaubert
4d18aa63cd Refactor pluginwatcher to use the new API 2018-09-06 14:42:21 +02:00
Renaud Gaubert
2eb91e89c0 Update the plugin watcher interface 2018-09-06 14:42:21 +02:00
chentao1596
ce3f5002dd Add unit tests for methods of pod's format 2018-07-17 15:37:13 +08:00
chentao1596
9319be121e Change the method name from PodsWithDeletiontimestamps to PodsWithDeletionTimestamps 2018-07-17 15:34:32 +08:00
hui luo
d04f596829 Add hierarchy support for plugin directory
it traverses and watch plugin directory and its sub directory recursively,
plugin socket file only need be unique within one directory,

- plugin socket directory
-    |
-    ---->sub directory 1
-    |              |
-    |              ----->  socket1,  socket2 ...
-    ----->sub directory 2
-                  |
-                  ------> socket1, socket2 ...

the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

four bonus changes added as below

1. extract example handler out from test, it is easier to read the code
with the seperation.

2. there are two variables here: "Watcher" and "watcher".
"Watcher" is the plugin watcher, and "watcher" is the fsnotify watcher.
so rename the "watcher" to "fsWatcher" to make code easier to
understand.

3. change RegisterCallbackFn() return value order, it is
conventional to return error last, after this change,
the pkg/volume/csi is compliance with golint, so remove it
from hack/.golint_failures

4. refactor errors handling at invokeRegistrationCallbackAtHandler()
to make error message more clear.
2018-06-25 17:32:18 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton
a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
Jeff Grafton
01f94051c8 Remove the go_default_library_protos filegroups using buildozer 2018-06-22 16:22:18 -07:00
vikaschoudhary16
3a2e3bcc70 Add probe based mechanism for kubelet plugin discovery 2018-05-29 12:00:37 -04:00
vikaschoudhary16
401bab3642 Auto-generated files 2018-05-29 12:00:37 -04:00
wojtekt
068844aeb1 WatchingSecretManager 2018-05-17 12:18:14 +02:00
wojtekt
de37da8532 Refactor cache based manager 2018-05-16 10:59:32 +02:00
Jordan Liggitt
3fafdb7001 Detect backsteps correctly in base path detection
Avoid false positives with atomic writer ..<timestamp> directories
2018-03-13 02:23:06 -04:00
Jan Safranek
5110db5087 Lock subPath volumes
Users must not be allowed to step outside the volume with subPath.
Therefore the final subPath directory must be "locked" somehow
and checked if it's inside volume.

On Windows, we lock the directories. On Linux, we bind-mount the final
subPath into /var/lib/kubelet/pods/<uid>/volume-subpaths/<container name>/<subPathName>,
it can't be changed to symlink user once it's bind-mounted.
2018-03-05 09:14:44 +01:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Yu-Ju Hong
16e7c6ee17 Close the file before renaming in FileStore
Also change the unit test to use a real file system to detect errors
like this.
2017-11-03 10:24:49 -07:00
Kubernetes Submit Queue
dc35709eee Merge pull request #54085 from yujuhong/checkpoint-pkg
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a file store utility package in kubelet

More and more components checkpoints (i.e., persist their states) in
kubelet. Refurbish and move the implementation in dockershim to a
utility package to improve code reusability.
2017-11-02 13:50:16 -07:00
Pengfei Ni
28f67736b7 Add fake remote runtime service 2017-10-27 15:16:53 +08:00
Yu-Ju Hong
4b5a3ee2e5 Address more comments 2017-10-25 10:07:32 -07:00
Yu-Ju Hong
5cbca87add Address comments, fix lint failures, and bazel complaints 2017-10-19 15:18:30 -07:00
Yu-Ju Hong
9f2e29f0f0 Update bazel file 2017-10-17 10:42:19 -07:00
Yu-Ju Hong
5169cc85cf Add a file store utility package in kubelet
More and more components checkpoints (i.e., persist their states) in
kubelet. Refurbish and move the implementation in dockershim to a
utility package to improve code reusability.
2017-10-17 10:36:33 -07:00
Clayton Coleman
5649f9a578 Move pkg/kubelet/util/csr into client-go
Everything else it depends on was already there, and now we have a
somewhat consistent code chain.
2017-10-16 16:05:48 +02:00
Clayton Coleman
b3a11aa635 Have the certificate manager decide if the server is healthy
Prevent a Kubelet from shutting down when the server isn't responding to
us but we cannot get a new certificate. This allows a cluster to coast
if the master is unresponsive or a node is partitioned and their client
cert expires.
2017-10-16 14:27:03 +02:00
Clayton Coleman
cbecf17727 cache.ListWatchUntil should return err.ErrWaitTimeout
Clients shouldn't have to know about watch.ErrWatchClosed, which is
typically a server side decision to close and always means "Timeout" in
this conetxt.
2017-10-16 14:27:03 +02:00
Clayton Coleman
c3bea24ab6 Collapse duplicate code into pkg/util/csr
There is no reason to duplicate this code into two places.
2017-10-16 14:27:03 +02:00
Clayton Coleman
de3d7d1881 If CSR is deleted, exit immediately
No point in waiting
2017-10-16 14:27:02 +02:00
Clayton Coleman
74a0abb699 An expired certificate is not compatible
If the certificate in the CSR is expired, it's no good to the code.
Error out with the correct message.
2017-10-16 14:27:02 +02:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
gmarek
0504cfbc25 Make metav1.(Micro)?Time functions take pointers 2017-08-17 11:24:28 +02:00
Ed Schouten
77dee9bb4e Merge branch 'master' into util-freebsd 2017-08-11 23:44:13 +02:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton
cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Ed Schouten
d2851da325 Make socket address parsing work on FreeBSD.
On FreeBSD, it is perfectly reasonable to make use of util_linux.go.
Rename util_linux.go to util_unix.go so that it may be used on non-Linux
UNIX-like systems. Add proper 'freebsd' build tags.
2017-08-09 21:22:26 +02:00
Clayton Coleman
0daee3ad22 Use the UpgradeAwareProxy in kubectl proxy
Requires a separate transport that is guaranteed not to be HTTP/2 for
exec/attach/portforward, because otherwise the Go client attempts to
upgrade us to HTTP/2 first.
2017-08-04 12:48:21 -04:00