Enabling persistPaths
in devPod spec always replaces devPod even when there has been no config/podSpec changes
#2870
Labels
kind/bug
Something isn't working
What happened?
My devPod is always replaced by a new "pod" which is identical to the already running pod. This cause some delay between consecutive
devspace dev
command which is unecessary as it is the same podSpec. When using--debug
I can see a log statement:which comes from:
devspace/pkg/devspace/services/podreplace/replace.go
Line 175 in 3212b31
There I could identify the root cause which boils down to using persistPaths which adds initContainer to the pods spec. Apparently, these always cause a replacement which I find odd since they did not change between consecutive sessions. This is also true for the config-hash annotations of the deployment resource which stays the same between sessions. The podSpec is also identical but the pod-template-hash annotations changes which causes the replacement in the first place, I would assume.
What did you expect to happen instead?
I expect no replacement to happen if the devspace.yaml config stays the same.
How can we reproduce the bug? (as minimally and precisely as possible)
Any devspace.yaml wich configures as
persistPaths
option:Removing the persistPaths fixes the issue and no replacement happens between sessions.
Curiously, for my config it still prints the same log messages and shows me some patches (without initContainers) that are applied but these do not cause the deployment to change and thus do not trigger a replacement.
Local Environment:
Kubernetes Cluster:
Anything else we need to know?
The text was updated successfully, but these errors were encountered: