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 ...@@ -125,6 +125,15 @@ For more information, see [the AlibabaCloud documentation on RAM users guides][1
kubectl apply -f install/velero.yaml 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) ## Installing the nginx example (optional)
1. nginx example without persistent volumes 1. nginx example without persistent volumes
......
...@@ -296,10 +296,10 @@ func getEBSDiskID(pv *v1.PersistentVolume) (string, error) { ...@@ -296,10 +296,10 @@ func getEBSDiskID(pv *v1.PersistentVolume) (string, error) {
return "", err return "", err
} }
options := pv.Spec.FlexVolume.Options options := pv.Spec.FlexVolume.Options
if options == nil || options["volumeId"] == "" { if options == nil || options["VolumeId"] == "" {
return "", errors.New("spec.FlexVolume.Options['volumeId'] not found") return "", errors.New("spec.FlexVolume.Options['VolumeId'] not found")
} }
return options["volumeId"], nil return options["VolumeId"], nil
} }
return "", nil return "", nil
} }
...@@ -323,7 +323,7 @@ func setEBSDiskID(pv *v1.PersistentVolume, diskID string) error { ...@@ -323,7 +323,7 @@ func setEBSDiskID(pv *v1.PersistentVolume, diskID string) error {
options = map[string]string{} options = map[string]string{}
pv.Spec.FlexVolume.Options = options pv.Spec.FlexVolume.Options = options
} }
options["volumeId"] = diskID options["VolumeId"] = diskID
return nil 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