Commit 9ecce3e2 by Shuwei Hao

fix FlexVolume options volumeId to VolumeId and update README.md

parent 390fa616
......@@ -125,6 +125,15 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
kubectl apply -f install/velero.yaml
```
4. Cleanup velero installation
Run the following command to cleanup the velero installation
```
kubectl delete namespace/velero clusterrolebinding/velero
kubectl delete crds -l component=velero
```
## Installing the nginx example (optional)
1. nginx example without persistent volumes
......
......@@ -296,10 +296,10 @@ func getEBSDiskID(pv *v1.PersistentVolume) (string, error) {
return "", err
}
options := pv.Spec.FlexVolume.Options
if options == nil || options["volumeId"] == "" {
return "", errors.New("spec.FlexVolume.Options['volumeId'] not found")
if options == nil || options["VolumeId"] == "" {
return "", errors.New("spec.FlexVolume.Options['VolumeId'] not found")
}
return options["volumeId"], nil
return options["VolumeId"], nil
}
return "", nil
}
......@@ -323,7 +323,7 @@ func setEBSDiskID(pv *v1.PersistentVolume, diskID string) error {
options = map[string]string{}
pv.Spec.FlexVolume.Options = options
}
options["volumeId"] = diskID
options["VolumeId"] = diskID
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment