Skip to content

Commit

Permalink
rename docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Feb 28, 2019
1 parent 8b564d3 commit 1078154
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**WARNING**: This driver is in ALPHA currently. Do NOT use this driver in a production environment in its current state.

### About
This driver allows Kubernetes to use [azure file](https://docs.microsoft.com/en-us/azure/storage/files/storage-files-introduction) volume, csi plugin name: `blobfuse.csi.azure.com`
This driver allows Kubernetes to use [blobfuse](https://docs.microsoft.com/en-us/azure/storage/files/storage-files-introduction) volume, csi plugin name: `blobfuse.csi.azure.com`

### Project Status
Status: Aplha
Expand Down Expand Up @@ -47,7 +47,7 @@ kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driv
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi.yaml
```

##### Option#2: Azurefile Static Provisioning(use an existing azure file share)
##### Option#2: Azurefile Static Provisioning(use an existing blobfuse share)
- Use `kubectl create secret` to create `azure-secret` with existing storage account name and key
```
kubectl create secret generic azure-secret --from-literal accountname=NAME --from-literal accountkey="KEY" --type=Opaque
Expand Down
10 changes: 5 additions & 5 deletions docs/csi-dev.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure file CSI driver development guide

- Build azure file plugin
- Build blobfuse plugin
```
$ make blobfuse
```
Expand All @@ -27,26 +27,26 @@ $ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
"csi-blobfuse" "v0.5.0-alpha"
```

#### 2. Create an azure file volume
#### 2. Create an blobfuse volume
```
$ csc controller new --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeName --req-bytes 2147483648 --params skuname=Standard_LRS
CSIVolumeID 2147483648 "accountname"="f5713de20cde511e8ba4900" "skuname"="Standard_LRS"
```

#### 3. Mount an azure file volume to a user specified directory
#### 3. Mount an blobfuse volume to a user specified directory
```
$ mkdir ~/testmount
$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --target-path ~/testmount CSIVolumeID
#f5713de20cde511e8ba4900#pvc-file-dynamic-8ff5d05a-f47c-11e8-9c3a-000d3a00df41
```

#### 4. Unmount azure file volume
#### 4. Unmount blobfuse volume
```
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path ~/testmount CSIVolumeID
CSIVolumeID
```

#### 5. Delete azure file volume
#### 5. Delete blobfuse volume
```
$ csc controller del --endpoint tcp://127.0.0.1:10000 CSIVolumeID
CSIVolumeID
Expand Down
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Implement NodeStage/NodeUnstage functions | to-do | two pods on same node could
Implement azure blobfuse.csi driver on Windows | to-do | |

### Implementation details
To prevent possible regression issues, blobfuse CSI driver use [azure cloud provider](https://github.com/kubernetes/kubernetes/tree/v1.13.0/pkg/cloudprovider/providers/azure) library. Thus, all bug fixes in the built-in azure file plugin would be incorporated into this driver.
To prevent possible regression issues, blobfuse CSI driver use [azure cloud provider](https://github.com/kubernetes/kubernetes/tree/v1.13.0/pkg/cloudprovider/providers/azure) library. Thus, all bug fixes in the built-in blobfuse plugin would be incorporated into this driver.
10 changes: 5 additions & 5 deletions docs/driver-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
Name | Meaning | Example | Mandatory | Default value
--- | --- | --- | --- | ---
skuName | azure file storage account type (alias: `storageAccountType`) | `Standard_LRS`, `Standard_GRS`, `Standard_RAGRS` | No | `Standard_LRS`
storageAccount | specify the storage account name in which azure file share will be created | STORAGE_ACCOUNT_NAME | No | if empty, driver will find a suitable storage account that matches `skuName` in the same resource group; if a storage account name is provided, it means that storage account must exist otherwise there would be error
location | specify the location in which azure file share will be created | `eastus`, `westus`, etc. | No | if empty, driver will use the same location name as current k8s cluster
resourceGroup | specify the resource group in which azure file share will be created | existing resource group name | No | if empty, driver will use the same resource group name as current k8s cluster
skuName | blobfuse storage account type (alias: `storageAccountType`) | `Standard_LRS`, `Standard_GRS`, `Standard_RAGRS` | No | `Standard_LRS`
storageAccount | specify the storage account name in which blobfuse share will be created | STORAGE_ACCOUNT_NAME | No | if empty, driver will find a suitable storage account that matches `skuName` in the same resource group; if a storage account name is provided, it means that storage account must exist otherwise there would be error
location | specify the location in which blobfuse share will be created | `eastus`, `westus`, etc. | No | if empty, driver will use the same location name as current k8s cluster
resourceGroup | specify the resource group in which blobfuse share will be created | existing resource group name | No | if empty, driver will use the same resource group name as current k8s cluster

- Static Provisioning(use existing azure disk)
> get a quick example [here](../deploy/example/pv-blobfuse-csi.yaml)
Name | Meaning | Available Value | Mandatory | Default value
--- | --- | --- | --- | ---
volumeAttributes.sharename | azure file share name | existing azure file share name | Yes |
volumeAttributes.sharename | blobfuse share name | existing blobfuse share name | Yes |
nodePublishSecretRef.name | secret name that stores storage account name and key | existing secret name | Yes |
nodePublishSecretRef.namespace | namespace where the secret is | k8s namespace | No | `default`
2 changes: 1 addition & 1 deletion docs/install-blobfuse-csi-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ csi-blobfuse-nqxn9 2/2 Running 0 21h 10.240.0.35 k8
csi-blobfuse-provisioner-0 1/1 Running 0 22h 10.240.0.39 k8s-agentpool-17181929-1
```

- clean up azure file CSI driver
- clean up blobfuse CSI driver

```
kubectl delete ds csi-blobfuse -n kube-system
Expand Down
16 changes: 8 additions & 8 deletions pkg/blobfuse/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"google.golang.org/grpc/status"
)

// CreateVolume provisions an azure file
// CreateVolume provisions an blobfuse
func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) {
if err := d.ValidateControllerServiceRequest(csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME); err != nil {
klog.Errorf("invalid create volume req: %v", req)
Expand Down Expand Up @@ -73,7 +73,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
}
}

// when use azure file premium, account kind should be specified as FileStorage
// when use blobfuse premium, account kind should be specified as FileStorage
accountKind := string(storage.StorageV2)
if strings.HasPrefix(strings.ToLower(sku), "premium") {
accountKind = string(storage.FileStorage)
Expand Down Expand Up @@ -110,7 +110,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
}, nil
}

// DeleteVolume delete an azure file
// DeleteVolume delete an blobfuse
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) {
if len(req.GetVolumeId()) == 0 {
return nil, status.Error(codes.InvalidArgument, "Volume ID missing in request")
Expand All @@ -135,11 +135,11 @@ func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest)
return nil, fmt.Errorf("no key for storage account(%s) under resource group(%s), err %v", accountName, resourceGroupName, err)
}

klog.V(2).Infof("deleting azure file(%s) rg(%s) account(%s) volumeID(%s)", fileShareName, resourceGroupName, accountName, volumeID)
klog.V(2).Infof("deleting blobfuse(%s) rg(%s) account(%s) volumeID(%s)", fileShareName, resourceGroupName, accountName, volumeID)
if err := d.cloud.DeleteFileShare(accountName, accountKey, fileShareName); err != nil {
return nil, err
}
klog.V(2).Infof("azure file(%s) under rg(%s) account(%s) volumeID(%s) is deleted successfully", fileShareName, resourceGroupName, accountName, volumeID)
klog.V(2).Infof("blobfuse(%s) under rg(%s) account(%s) volumeID(%s) is deleted successfully", fileShareName, resourceGroupName, accountName, volumeID)

return &csi.DeleteVolumeResponse{}, nil
}
Expand All @@ -155,7 +155,7 @@ func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.Valida

// todo: we may check file share existence here

// azure file supports all AccessModes, no need to check capabilities here
// blobfuse supports all AccessModes, no need to check capabilities here
return &csi.ValidateVolumeCapabilitiesResponse{Message: ""}, nil
}

Expand All @@ -179,13 +179,13 @@ func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (
}

// ControllerPublishVolume make a volume available on some required node
// N/A for azure file
// N/A for blobfuse
func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}

// ControllerUnpublishVolume make the volume unavailable on a specified node
// N/A for azure file
// N/A for blobfuse
func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/blobfuse/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublish
}

// NodeStageVolume mount the volume to a staging path
// todo: we may implement this for azure file
// todo: we may implement this for blobfuse
// The reason that mounting is a two step operation is
// because Kubernetes allows you to use a single volume by multiple pods.
// This is allowed when the storage system supports it or if all pods run on the same node.
Expand All @@ -199,7 +199,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
}

// NodeUnstageVolume unmount the volume from the staging path
// todo: we may implement this for azure file
// todo: we may implement this for blobfuse
// The reason that mounting is a two step operation is
// because Kubernetes allows you to use a single volume by multiple pods.
// This is allowed when the storage system supports it or if all pods run on the same node.
Expand Down
2 changes: 1 addition & 1 deletion test/integration/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if [ -v aadClientSecret ]; then
echo "got volume id: $volumeid"

if [ "$cloud" != "AzureChinaCloud" ]; then
# azure file mount/unmount on travis VM does not work against AzureChinaCloud
# blobfuse mount/unmount on travis VM does not work against AzureChinaCloud
echo "mount volume test:"
$csc node publish --endpoint $endpoint --cap 1,block --target-path $target_path $volumeid
retcode=$?
Expand Down

0 comments on commit 1078154

Please sign in to comment.