Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Parthvi Vala <[email protected]>
  • Loading branch information
feloy and valaparthvi authored Nov 23, 2022
1 parent 2c0af4d commit f4a1e1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/dev/podmandev/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ func createPodFromComponent(
Name: storage.OdoSourceVolume,
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: getVolumeName(componentName, appName, "odo-projects"),
ClaimName: getVolumeName(storage.OdoSourceVolume, componentName, appName),
},
},
},
{
Name: storage.SharedDataVolumeName,
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: getVolumeName(componentName, appName, "odo-shared"),
ClaimName: getVolumeName(storage.SharedDataVolumeName, componentName, appName),
},
},
},
Expand All @@ -68,7 +68,7 @@ func createPodFromComponent(
Name: devfileVolume.Name,
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: getVolumeName(componentName, appName, devfileVolume.Name),
ClaimName: getVolumeName(devfileVolume.Name, componentName, appName),
},
},
})
Expand Down Expand Up @@ -96,7 +96,7 @@ func createPodFromComponent(
return &pod, fwPorts, nil
}

func getVolumeName(componentName string, appName string, volume string) string {
func getVolumeName(volume string, componentName string, appName string) string {
return volume + "-" + componentName + "-" + appName
}

Expand Down

0 comments on commit f4a1e1d

Please sign in to comment.