Commit Graph

21 Commits

Author SHA1 Message Date
Claudiu Belu
38092cb458 unittests: Fixes unit tests for Windows (part 2)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- volume mounting is a bit different on Windows: Mount will create the
  parent dirs and mklink at the volume path later (otherwise mklink will
  raise an error).
- os.Chmod is not working as intended on Windows.
- path.Dir() will always return "." on Windows, and filepath.Dir()
  should be used instead (which works correctly).
- on Windows, you can't typically run binaries without extensions. If
  the file C:\\foo.bat exists, we can still run C:\\foo because Windows
  will append one of the supported file extensions ($env:PATHEXT) to it
  and run it.
- Windows file permissions do not work the same way as the Linux ones.
- /tmp directory being used, which might not exist on Windows. Instead,
  the OS-specific Temp directory should be used.

Fixes a few other issues:

- rbd.go: Return error in a case in which an error is encountered. This
  will prevent "rbd: failed to setup" and "rbd: successfully setup" log
  messages to be logged at the same time.
2022-08-01 18:56:32 +03:00
mengjiao.liu
c24b87b133 Fixed a possible nil pointer dereference caused by variable plug 2021-05-21 10:17:04 +08:00
wangyx1992
7fe934a72d cleanup: fix log capitalization in volume package
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-04-14 21:58:56 +08:00
Shihang Zhang
3db7275b54 set proper file permission for projected service account volume 2020-05-04 18:25:23 -07:00
David Zhu
21f7060c8f Plumb test state through to fake volume host creation for error handling 2019-11-18 14:45:01 -08:00
caiweidong
94a2a42412 Fix projected volume test clean up 2019-07-10 10:14:36 +08:00
Robert Krawitz
5b97b2860d Change fsGroup to mounterArgs in volume.SetUp() to allow for future extension. 2019-05-29 15:12:28 -04:00
Travis Rhoden
78d109e201 Always use filepath.Join instead of path.Join
This patch cleans up pkg/util/mount/* and pkg/util/volume/* to always
use filepath.Join instead of path.Join. filepath.Join is preferred
because path.Join can have issues on Windows.
2019-04-29 09:56:05 -06:00
Davanum Srinivas
7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
Mike Danese
3167b15908 TokenRequestProjections should allow API server to default empty audience 2018-11-13 20:25:16 -08:00
Cheng Pan
42ef7ae8d5 fix golint issues for pkg/volume/empty_dir 2018-10-15 20:00:36 +00:00
Hemant Kumar
85e337153a verify invalid secret/configmap/projected volumes
And avoid calling Setup if they don't exist
2018-09-14 17:38:52 -04:00
Joel Smith
b4e0923785 Rework method of updating atomic-updated data volumes
This change affects the way that secret, configmap, downwardAPI and projected
volumes (which all use the same underlying code) implement their data update
functionality.

* Instead of creating a subdirectory hierarchy that itself
  will contain symlinks to each actual data file, create only
  symlinks to items in the root of the volume, whether they
  be files or directories.
* Rather than comparing the user-visible data directory
  to see if an update is needed, compare with the current
  version of the data directory.
* Fix data dir timestamp format year
* Create ..data symlink even when a data volume has no data so
  consumers can have simplified update watch logic.
2018-01-17 12:09:20 -07:00
Yang Guo
82c9eec164 Expose single annotation/label via downward API 2017-11-21 19:21:10 -08:00
linyouchong
02e8ffe13c fix incorrect log 2017-10-26 01:40:24 +08:00
Cheng Xing
396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Shyam Jeedigunta
4425864707 Migrate kubelet configmap management logic to an interface 2017-05-31 10:39:36 +02:00
Jeff Peeler
8fb1b71c66 Implements projected volume driver
Proposal: kubernetes/kubernetes#35313
2017-02-20 12:56:04 -05:00