devspace
devspace copied to clipboard
Docker compose conversion issues
What happened?
Running devspace init with a docker-compose.yml present in the repo, there are several issues:
- Volumes in docker-compose.yml may contain
_character which is not permitted as Kubernetes name for volumes. - We should not add
restartPolicy: Neverbecause it can lead to the error:Error: StatefulSet.apps "xyz" is invalid: spec.template.spec.restartPolicy: Unsupported value: "Never": supported values: "Always" - Images in the
deploymentssection should use DevSpace runtime variables to prevent duplicate use of the same string. -
devsection should be using imageSelector and DevSpace runtime variables instead of labelSelector -
devsection should useport + 9000or something similar for localhost ports if ports are using numbers < 1024 because these ports cannot be used without sudo/root which should not be recommended and can lead to other issues. - If a service has 2 port definitions, UDP and TCP, the port-forwarding section should NOT contain 2x the same port because that will cause issues with DevSpace trying to listen to the same port twice which fails.
What did you expect to happen instead? Docker compose conversion to make smarter assumptions that actually work in Kubernetes, i.e. fix above issues.
How can we reproduce the bug? (as minimally and precisely as possible)
My devspace.yaml:
version: ...
...
Local Environment:
- DevSpace Version: [use
devspace --version] - Operating System: windows | linux | mac
- ARCH of the OS: AMD64 | ARM64 | i386 Kubernetes Cluster:
- Cloud Provider: google | aws | azure | other
- Kubernetes Version: [use
kubectl version]
Anything else we need to know?
/kind bug
Hi, any updates on this?