Skip to content

Commit

Permalink
Merge pull request #2794 from Sancerio/lsancerio/fix-volume-name
Browse files Browse the repository at this point in the history
fix: use string hash for volumeName
  • Loading branch information
FabianKramm authored Jan 22, 2024
2 parents b21c769 + 3363d33 commit d0ae0ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/devspace/services/podreplace/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ func replaceCommand(ctx devspacecontext.Context, devPod *latest.DevPod, devConta

// should we inject devspace restart helper?
if injectRestartHelper {
annotationName := restartHelperAnnotation + strings.ToLower(hash.String(container.Name))[0:10]
containerHash := strings.ToLower(hash.String(container.Name))[0:10]
annotationName := restartHelperAnnotation + containerHash
if podTemplate.Annotations == nil {
podTemplate.Annotations = map[string]string{}
}
Expand All @@ -327,7 +328,7 @@ func replaceCommand(ctx devspacecontext.Context, devPod *latest.DevPod, devConta
}
podTemplate.Annotations[annotationName] = restartHelperString

volumeName := "devspace-restart-" + container.Name
volumeName := "devspace-restart-" + containerHash
podTemplate.Spec.Volumes = append(podTemplate.Spec.Volumes, corev1.Volume{
Name: volumeName,
VolumeSource: corev1.VolumeSource{
Expand Down

0 comments on commit d0ae0ec

Please sign in to comment.