Commit Graph

45 Commits

Author SHA1 Message Date
Stephen Kitt
56d8302bc8
Use k8s utils pointer instead of Azure autorest/to
Since k/u includes pointer functions which are equivalent to the
autorest/to pointer functions, and the latter are deprecated, it seems
useful to switch to the former:
* to.FooPtr becomes pointer.Foo
* to.Foo becomes pointer.FooDeref with an appropriate default
* to.StringSlicePtr becomes &

This doesn't remove anything from vendor, but it does turn the
dependency into an indirect one, ready to be removed when the rest of
the Azure migration happens.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2022-12-07 18:16:16 +01:00
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
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
mengjiao.liu
c24b87b133 Fixed a possible nil pointer dereference caused by variable plug 2021-05-21 10:17:04 +08:00
andyzhangx
ff110654e9 fix: azure file latency issue for metadata-heavy workload 2020-12-05 12:42:56 +00:00
Srini Brahmaroutu
fbe5daed73 Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -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
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Travis Rhoden
1fd8921546
Move mount/fake.go to mount/fake_mount.go
This patch moves fake.go to mount_fake.go, and follows to principle of
always returning a discrete type rather than an Interface. All callers
of "FakeMounter" are changed to instead use "NewFakeMounter()". The
FakeMounter "Log" struct member is changed to not be exported, and
instead only access through a new "GetLog()" method.
2019-11-08 08:07:41 -07:00
David Eads
7d897d5f77 make azure fail if feature gates are not registered 2019-11-07 12:42:09 -05:00
haoshuwei
b752997036 add or fix some errors return statements and ineffassign
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2019-09-14 09:26:17 +08:00
Benjamin Elder
5a3301a59d s/nolegacyproviders/providerless/ 2019-08-22 15:30:56 -07:00
Benjamin Elder
678d3f2841 add build tags to legacy provider code and make it possible to build kube-controller-manager without any legacyproviders or without particular legacy providers 2019-08-22 14:53:35 -07:00
Robert Krawitz
5b97b2860d Change fsGroup to mounterArgs in volume.SetUp() to allow for future extension. 2019-05-29 15:12:28 -04:00
Mike Crute
7d62316f8f Migrate fake cloud provider to staging 2019-05-14 13:32:18 -07:00
Stephen Augustus
2f74c90480 Staging the legacy Azure Cloud Provider
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2019-04-25 20:03:45 -04:00
Shubheksha Jalan
6f82f40760 replace path with filepath 2018-04-24 19:08:38 +05:30
jianglingxia
8c78be92af Delete the two same if in func TestPlugin 2018-02-24 19:16:00 +08:00
andyzhangx
c38e7589a4 set fsGroup by securityContext.fsGroup in azure file
fix comments

fix comments

fix comments
2018-01-17 09:24:50 +00:00
andyzhangx
e316bbcdb3 add vers mountoptions and fix comments 2017-11-16 07:15:26 +00:00
andyzhangx
badefda861 support mount options in azure file
use JoinMountOptions func

add a new test case

move const vars

fix fmt issue
2017-11-16 07:15:23 +00:00
linyouchong
02e8ffe13c fix incorrect log 2017-10-26 01:40:24 +08:00
linyouchong
66d68d7d2a Abstract contains func to common place 2017-10-20 19:27:55 +08:00
Cheng Xing
396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Huamin Chen
4525446af2 azure file volume: add secret namespace api
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:49:58 +00:00
xiangpengzhao
35b45d60b2 Use Fatalf instead of Errorf when mounter/unmounter if nil in volume tests 2017-08-23 10:29:30 +08:00
Cosmin Cojocar
7ae381207e Remove unused import after rebase 2017-07-19 08:59:32 +02:00
Cosmin Cojocar
5c4290d4f2 Add tests for other cloud providers 2017-07-19 08:56:12 +02:00
Cosmin Cojocar
b79a7a12c8 Fix the Azure file to work within different cloud environments 2017-07-19 08:55:24 +02: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
Huamin Chen
6782a48dfa Enable storage class support in Azure File volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-02-27 15:34:37 -05:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Chao Xu
03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Chao Xu
bb675d395f dependencies: pkg/volume 2016-11-23 15:53:09 -08:00
Paul Morie
4722cb299b Remove GetRootContext from VolumeHost 2016-11-03 12:21:19 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
saadali
542f2dc708 Introduce new kubelet volume manager
This commit adds a new volume manager in kubelet that synchronizes
volume mount/unmount (and attach/detach, if attach/detach controller
is not enabled).

This eliminates the race conditions between the pod creation loop
and the orphaned volumes loops. It also removes the unmount/detach
from the `syncPod()` path so volume clean up never blocks the
`syncPod` loop.
2016-06-15 09:34:08 -07:00
saadali
79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
Tim St. Clair
246b389275 Move test-only volume files to test-only volume package 2016-02-29 14:44:28 -08:00
Chao Xu
ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
Tim Hockin
7cab7bd472 fix a few go-vet errors 2016-02-09 13:20:31 -08:00
Huamin Chen
d7e4b826b9 support Azure File Service volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-02-09 01:07:12 +00:00