Skip to content

Commit 3acaee0

Browse files
authored
Merge pull request #145 from c3y1huang/c3y1/typo/exit
Fix typos
2 parents 5b48019 + 8677a16 commit 3acaee0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

examples/csi-app.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ spec:
1313
volumes:
1414
- name: my-csi-volume
1515
persistentVolumeClaim:
16-
claimName: csi-pvc # defined in csi-pvs.yaml
16+
claimName: csi-pvc # defined in csi-pvc.yaml

examples/csi-pvc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ spec:
88
resources:
99
requests:
1010
storage: 1Gi
11-
storageClassName: csi-hostpath-sc # defined in csi-setup.yaml
11+
storageClassName: csi-hostpath-sc # defined in csi-storageclass.yaml

pkg/hostpath/controllerserver.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
125125
// check for the requested capacity and already allocated capacity
126126
if exVol, err := getVolumeByName(req.GetName()); err == nil {
127127
// Since err is nil, it means the volume with the same name already exists
128-
// need to check if the size of exisiting volume is the same as in new
128+
// need to check if the size of existing volume is the same as in new
129129
// request
130130
if exVol.VolSize >= int64(req.GetCapacityRange().GetRequiredBytes()) {
131-
// exisiting volume is compatible with new request and should be reused.
131+
// existing volume is compatible with new request and should be reused.
132132
// TODO (sbezverk) Do I need to make sure that volume still exists?
133133
return &csi.CreateVolumeResponse{
134134
Volume: &csi.Volume{

pkg/hostpath/hostpath.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func getVolumeByID(volumeID string) (hostPathVolume, error) {
139139
if hostPathVol, ok := hostPathVolumes[volumeID]; ok {
140140
return hostPathVol, nil
141141
}
142-
return hostPathVolume{}, fmt.Errorf("volume id %s does not exit in the volumes list", volumeID)
142+
return hostPathVolume{}, fmt.Errorf("volume id %s does not exist in the volumes list", volumeID)
143143
}
144144

145145
func getVolumeByName(volName string) (hostPathVolume, error) {
@@ -148,7 +148,7 @@ func getVolumeByName(volName string) (hostPathVolume, error) {
148148
return hostPathVol, nil
149149
}
150150
}
151-
return hostPathVolume{}, fmt.Errorf("volume name %s does not exit in the volumes list", volName)
151+
return hostPathVolume{}, fmt.Errorf("volume name %s does not exist in the volumes list", volName)
152152
}
153153

154154
func getSnapshotByName(name string) (hostPathSnapshot, error) {
@@ -157,10 +157,10 @@ func getSnapshotByName(name string) (hostPathSnapshot, error) {
157157
return snapshot, nil
158158
}
159159
}
160-
return hostPathSnapshot{}, fmt.Errorf("snapshot name %s does not exit in the snapshots list", name)
160+
return hostPathSnapshot{}, fmt.Errorf("snapshot name %s does not exist in the snapshots list", name)
161161
}
162162

163-
// getVolumePath returs the canonical path for hostpath volume
163+
// getVolumePath returns the canonical path for hostpath volume
164164
func getVolumePath(volID string) string {
165165
return filepath.Join(dataRoot, volID)
166166
}

0 commit comments

Comments
 (0)