mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
StorageOS support for containerized kubelet and mount options
This change queries the StorageOS API to retrieve the volume device dir when a volume is attached, rather than relying on the default /var/lib/storageos/volumes directory. This allows all or some nodes to have kubelet running in a container with the StorageOS volume path mounted in, which is required for Azure ACS support. Volume mount options are also supported.
This commit is contained in:
@@ -108,6 +108,9 @@ func (f fakeAPI) VolumeUnmount(opts storageostypes.VolumeUnmountOptions) error {
|
||||
func (f fakeAPI) VolumeDelete(opts storageostypes.DeleteOptions) error {
|
||||
return nil
|
||||
}
|
||||
func (f fakeAPI) Controller(ref string) (*storageostypes.Controller, error) {
|
||||
return &storageostypes.Controller{}, nil
|
||||
}
|
||||
|
||||
func TestCreateVolume(t *testing.T) {
|
||||
|
||||
@@ -224,7 +227,7 @@ func TestAttachVolume(t *testing.T) {
|
||||
mounter: &mount.FakeMounter{},
|
||||
plugin: plug.(*storageosPlugin),
|
||||
},
|
||||
devicePath: tmpDir,
|
||||
deviceDir: tmpDir,
|
||||
}
|
||||
if err != nil {
|
||||
t.Errorf("Failed to make a new Mounter: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user