Commit Graph

94 Commits

Author SHA1 Message Date
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
Xing Yang
000ab86788 Move CSIDriver Lister to the controller 2019-04-05 12:20:11 -07:00
Yecheng Fu
fa926ed6e0 Delay CSI client initialization 2019-03-09 13:45:03 +08:00
Vladimir Vivien
923ad369c8 CSI Inline Volume - Kubelet/Driver code impl 2019-03-08 12:40:09 -05:00
Xing Yang
6265f4f78c CSINodeInfo/CSIDriver controller changes
This is the 2nd PR to move CSINodeInfo/CSIDriver APIs to
v1beta1 core storage APIs. It includes controller side changes.
It depends on the PR with API changes:
https://github.com/kubernetes/kubernetes/pull/73883
2019-03-04 16:41:58 -08:00
David Zhu
5dde1df1cd Migration shim logic for Persistent Volumes for Attach/Detach 2019-02-14 17:04:23 -08:00
danielqsj
657a1a1a34 change import alias of utils/strings 2019-01-30 10:44:09 +08:00
danielqsj
093328e57f migrate to k8s.io/utils/strings 2019-01-30 10:24:00 +08:00
oleksiys
f6a0359c9d Fix CSI volume unmount and cleanup logic 2019-01-05 09:00:17 -08:00
saad-ali
aa8244beb5 Modify CSI to handle both 0.3 and 1.0
Modify the CSI volume plugin to handle CSI version 0.x as well as 1.x
2018-11-21 18:37:31 -08:00
saad-ali
2b44ec5e9c Reduce csipb dependencies
Remove csipb dependency from everywhere except the CSI client in
preperation for supporting multiple CSI clients.
2018-11-21 18:37:31 -08: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
Ben Swartzlander
65d3beb820 Add support for mount options to CSI drivers 2018-10-11 13:39:19 -04:00
Vladimir Vivien
e3bc731143 CSI fix for proper fsgroup application to volume 2018-09-14 14:58:18 -04:00
Cheng Xing
4ca39ef0ed Consolidated CSIDriver logic under CSIDriverRegistry flag 2018-09-10 13:34:40 -07:00
Jan Safranek
32ae639edf Add unit tests for pod information in NodePublish
Some refactoring of CSI tests was necessary.
2018-09-05 21:20:01 -04:00
Jan Safranek
a30fc9ca48 Pass pod information in CSI NodePublish attributes. 2018-09-05 21:02:45 -04:00
Jan Safranek
c6c74d6846 Skip attach for non-attachable CSI volumes 2018-09-05 10:15:43 -04:00
Krunal Jain
5dfe7b5758 Removes defaulting of CSI fsType to ext4 2018-06-28 16:48:25 -07:00
Vladimir Vivien
5044a3d12c CSI implementation of raw block volume support 2018-06-05 16:53:56 -04:00
Vladimir Vivien
d6d396215e CSI fix for gRPC conn leak, test updates 2018-05-31 23:05:41 -04:00
Jan Safranek
080d2dfe8f Add SELinux support to CSI 2018-05-18 14:27:13 +02:00
Kubernetes Submit Queue
6b6d1ea1ab
Merge pull request #62486 from vladimirvivien/csi-fsGroup-fix
Automatic merge from submit-queue (batch tested with PRs 62486, 62471, 62183). 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>.

CSI - Update to apply fsGroup volume ownership

**What this PR does / why we need it**:
This PR correctly fixes the CSI internal driver to apply fsGroup volume ownership value during mount.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62413 

```release-note
NONE
```
2018-04-13 16:01:06 -07:00
Kubernetes Submit Queue
028550f451
Merge pull request #61392 from jianglingxia/csi-mounter20180320
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>.

The err has checked in TearDownAt func/kind bug

**What this PR does / why we need it**:
The err has checked in TearDownAt func/kind bug
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-13 06:10:03 -07:00
Vladimir Vivien
e207e0b324 CSI - Apply fsGroup volume ownership when pv not readOnly 2018-04-13 08:55:27 -04:00
Kubernetes Submit Queue
89d8884fba
Merge pull request #61147 from mlmhl/csi
Automatic merge from submit-queue (batch tested with PRs 61147, 62236, 62018). 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>.

Return NodeStageVolume/NodePublishVolume error if operation failed for CSI

**What this PR does / why we need it**:

Currently in CSI volume plugin, if `NodeStageVolume`/`NodePublishVolume` operation failed, we will try to remove according target dir(global mount path or pod volume path) first. If this clear operation failed, according error will be returned, and finally displayed in `Pod`'s event. However, compared to this clear error, the user is more concerned about `NodeStageVolume`/`NodePublishVolume` error, so I suggest that just log the clear error and still return the `NodeStageVolume`/`NodePublishVolume` error.

**Release note**:

```release-note
NONE
```

/sig storage
2018-04-10 05:31:13 -07:00
Kubernetes Submit Queue
c079d1e6af
Merge pull request #61096 from mlmhl/csi_secret
Automatic merge from submit-queue (batch tested with PRs 61096, 61955, 61542, 60597). 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>.

Return error if get NodeStageSecret and NodePublishSecret failed

**What this PR does / why we need it**:

Currently, if got NodeStageSecret  or NodePublishSecret failed, we just log the error and assume that there is no credential. I think we should report the error as if user specified these secret, they expect to apply some credentials.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61052

**Release note**:

```release-note
NONE
```

/sig storage
2018-04-02 15:35:02 -07:00
hzxuzhonghu
70e45eccf2 Replace "golang.org/x/net/context" with "context" 2018-03-22 20:57:14 +08:00
jianglingxia
595e0ff5cb the err has checked in TearDownAt func/kind bug 2018-03-20 17:34:01 +08:00
mlmhl
b9606696c9 return error if get NodeStageSecret and NodePublishSecret failed 2018-03-20 12:57:08 +08:00
mlmhl
23dbd69925 return NodeStageVolume/NodePublishVolume error if operation failed 2018-03-15 11:03:30 +08:00
David Zhu
cbd18965fd Added MountDevice/UnmountDevice pass-through to NodeStageVolume/NodeUnstageVolume for CSI Volume Plugin. Added related unit tests. Vendored CSI Spec to HEAD 2018-02-26 14:50:32 -08:00
Serguei Bezverkhi
c8956fa93c CSI code changes 2018-02-24 16:30:17 -05:00
Serguei Bezverkhi
a6ca466859 k8s csi code change 2018-02-23 16:50:43 -05:00
Felipe Musse
5ff35681df Make CSI volume attributes first class 2018-02-22 09:16:20 -03:00
Ilias Tsitsimpis
6590c3fe35 csi: Remove stale volume path
The CSI mounter creates the following paths during SetUp():

   * .../pods/<podID>/volumes/kubernetes.io~csi/<specVolId>/mount/
   * .../pods/<podID>/volumes/kubernetes.io~csi/<specVolId>/volume_data.json

During TearDown(), it does not remove the `.../kubernetes.io~csi/<specVolId>/`
directory, leaving behind orphan volumes: method cleanupOrphanedPodDirs()
complains with 'Orphaned pod found, but volume paths are still present
on disk'.

Fix that by removing the above directory in removeMountDir().

Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
2018-02-15 13:30:36 +02:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
NickrenREN
7b9d2c046f Use v1beta1 VolumeAttachment 2018-01-31 18:46:11 +08:00
NickrenREN
87cebae738 Add fsType for CSI 2018-01-16 12:34:04 +08:00
linyouchong
9c3b2a00ac fix incorrect log 2017-12-13 18:36:58 +08:00
Vladimir Vivien
23d59cbe54 CSI - Multiple bug fixes for NodeProbe, vol data file, mount dir create
-  NodeProbe rpc before node attach
-  Teardown fix using  volume info data file stored on node
-  Pre-create the mount prior to calling nodepublish
2017-12-08 15:24:28 -05:00
Vladimir Vivien
fa519069d9 CSI - Extract volume attributes from PV annotations"
csi - code review fixes
2017-12-03 18:10:09 -05:00
Vladimir Vivien
179d8e108e CSI - feature gate fix, gated RBAC rules, csi nodeID label
This commit tracks chages to fix blocking bugs such as feature gates, rbac rules, usage
of csi nodeID to derive attachment ID.
2017-12-02 05:54:54 -05:00
Vladimir Vivien
dd08d1b489 CSI - API source code implementation
This commit tracks source code update for the CSI volume plugin implementation.
2017-11-21 20:20:58 -05:00