Commit Graph

127 Commits (8060d565946848abe4f67ffffb810dd3505fe4cb)

Author SHA1 Message Date
David Ashpole 207f9308ea fix node and kubelet start times 2018-12-12 13:36:49 -08:00
Vladimir Vivien e86bdc7989 Forces fsnotify CREATE and REMOVE to occur serially 2018-11-26 22:11:47 -05:00
saad-ali 8f666d9e41 Modify kubelet watcher to support old versions
Modify kubelet plugin watcher to support older CSI drivers that use an
the old plugins directory for socket registration.
Also modify CSI plugin registration to support multiple versions of CSI
registering with the same name.
2018-11-21 18:37:31 -08:00
Renaud Gaubert 1a3fbf1f13 Update e2e tests to include CSI 2018-11-17 01:52:57 +01:00
Renaud Gaubert 229418f261 Update pluginwatcher to ignore CSI metadata dir and non socket files 2018-11-17 01:51:00 +01:00
David Ashpole 630cb53f82 add kubelet grpc server for pod-resources service 2018-11-15 09:43:20 -08:00
Vladimir Vivien f16d3c56f6 Kubelet plugin watcher update to v1 2018-11-14 05:46:27 -05:00
Davanum Srinivas e558e291d1
s/glog/klog/ - keep up with master
Change-Id: I27ff0545bc456ed8c0900cfeb90555f9ab7ae235
2018-11-10 07:57:01 -05:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
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
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