Skip to content

Commit

Permalink
Revert "Optimize pvcTemplate Name for Storage #438 (#445)" (#510)
Browse files Browse the repository at this point in the history
This reverts commit ff6980f.

Signed-off-by: chobostar <[email protected]>
Co-authored-by: Kirill Petrov <[email protected]>
  • Loading branch information
chobostar and Kirill Petrov authored May 16, 2023
1 parent 1123a3e commit 553f2c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions k8sutils/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func getExternalConfig(configMapName string) []corev1.Volume {
func createPVCTemplate(stsMeta metav1.ObjectMeta, storageSpec corev1.PersistentVolumeClaim) corev1.PersistentVolumeClaim {
pvcTemplate := storageSpec
pvcTemplate.CreationTimestamp = metav1.Time{}
pvcTemplate.Name = "data"
pvcTemplate.Name = stsMeta.GetName()
pvcTemplate.Labels = stsMeta.GetLabels()
// We want the same annoations as the StatefulSet here
pvcTemplate.Annotations = generateStatefulSetsAnots(stsMeta)
Expand Down Expand Up @@ -477,7 +477,7 @@ func getVolumeMount(name string, persistenceEnabled *bool, externalConfig *strin

if persistenceEnabled != nil && *persistenceEnabled {
VolumeMounts = append(VolumeMounts, corev1.VolumeMount{
Name: "data",
Name: name,
MountPath: "/data",
})
}
Expand Down

0 comments on commit 553f2c0

Please sign in to comment.