Skip to content

Commit

Permalink
Merge pull request #2784 from maartendeprez/main
Browse files Browse the repository at this point in the history
Fix issues when using multiple containers in one pod
  • Loading branch information
lizardruss authored Jan 11, 2024
2 parents 150a453 + 5157b84 commit 26edf30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pkg/devspace/services/podreplace/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ func buildDeployment(ctx devspacecontext.Context, name string, target runtime.Ob
}

// replace paths
if len(devPod.PersistPaths) > 0 {
persist := false
loader.EachDevContainer(devPod, func(devContainer *latest.DevContainer) bool {
persist = len(devContainer.PersistPaths) > 0
return !persist
})
if persist {
err := persistPaths(name, devPod, podTemplate)
if err != nil {
return nil, err
Expand Down
3 changes: 2 additions & 1 deletion pkg/devspace/services/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ func StartSync(ctx devspacecontext.Context, devPod *latest.DevPod, selector targ

// init done array is used to track when sync was initialized
initDoneArray := []chan struct{}{}
starter := sync.NewDelayedContainerStarter()
loader.EachDevContainer(devPod, func(devContainer *latest.DevContainer) bool {
starter := sync.NewDelayedContainerStarter()

// make sure we add all the sync paths that need to wait for initial start
for _, syncConfig := range devContainer.Sync {
if syncConfig.StartContainer || (syncConfig.OnUpload != nil && syncConfig.OnUpload.RestartContainer) {
Expand Down

0 comments on commit 26edf30

Please sign in to comment.