Open plicit opened 3 weeks ago
Your compose-example.yaml also appears to be broken since it starts with name: caddy.
name:
field in the docker-compose.yaml, its required by the generator for this example
ex: docker-compose.yaml
name: namefieldincompose
version: "3"
translates to
# namefieldincompose.kube
[Kube]
Yaml=namefieldincompose-kube.yaml
---
# namefieldincompose-kube.yaml
apiVersion: v1
kind: Pod
metadata:
name: namefieldincompose
in the output after running podlet compose -kube
Thank you for your comment! I looked into it further and you are correct -- compose-example.yaml
is a valid docker compose file with the top-level "name" field for the project name:
https://docs.docker.com/compose/project-name/
I was confused because podlet v0.2.4 claims it is "not a valid compose file" due to the top-level project "name" field.
However, I just tested podlet v0.3.0 on Debian and it appears to work correctly, as you indicate. I thought I tested it previously on Linux, but I must have been mistaken.
So it looks like only the volume parsing for the Windows version is broken and I updated the title of this issue to reflect that fact.
Thanks again! :)
I don't have easy access to a Windows machine to test changes on, so someone else will need to work on this. I'm guessing that Path::is_absolute()
is being used in compose_spec::service::volumes
where it maybe shouldn't be.
The "volumes" field is not being parsed properly in v0.3.0 (v0.2.4 is ok).
(1) Error parsing volume source: invalid start character
/
:(2) Error: volume container path ... is not absolute
Your compose-example.yaml also appears to be broken since it starts with
name: caddy
.Both tests run fine in v0.2.4, after removing that first line in compose-example.yaml.
Thank you for podlet! I am new to quadlets and your tool helps me learn the basic conversion. :)