Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podman v5.0.0 #75

Merged
merged 19 commits into from
May 8, 2024
Merged

Podman v5.0.0 #75

merged 19 commits into from
May 8, 2024

Conversation

k9withabone
Copy link
Member

Adds support for quadlet options introduced in podman v5.0.0.

The headline feature is support for generating .pod quadlet files. They can be created from a podman command with podlet podman pod create, a compose file with podlet compose --pod, or an existing pod with podlet generate pod. podlet compose --pod and podlet generate pod creates both .pod and .container quadlet files and links them together.

Closes #68

… version

A new `String` was inserted into `quadlet::Container.podman_args` even
if no new options for the podman version were set. Added a check to see
if the serialized option args is empty before pushing to `podman_args`.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Also added v4.9.X aliases to 4.8 and v5.0.X aliases to 5.0.

`PodmanVersion::LATEST` (the default) is now v5.0.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
In `impl From<crate::cli::container::QuadletOptions> for crate::quadlet::Container`,
`QuadletOptions` is now destructured to ensure all fields are converted.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Adds the `podlet podman pod create` subcommand.

The `--infra-conmon-pidfile` and `--pod-id-file` options were
deliberately not implemented as they are set by quadlet in the generated
`{name}-pod.service` file and can't be set multiple times.

New `quadlet::Resource::Pod` variant.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Support for the `none` value was accidentally removed in d3da789.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Changed `cli::Commands::Compose` into a newtype variant which flattens
the new `cli::compose::Compose` struct.

Allows for the simplifying of error handling and makes
`cli::Commands::try_into_files()` less nested.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
`--pod` causes podlet to create a `.pod` quadlet file in addition to
the `.container`, `.volume`, and `.network` files. The containers are
linked to the pod and their published ports are moved.

The `name` field of `compose_spec::Compose` is required when using
`--pod`.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Adds the `podlet generate pod` subcommand which runs
`podman pod inspect` on the given pod, deserializes the output, parses
the pod creation command, and does the same for each of the pod's
containers.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
@k9withabone k9withabone added the enhancement New feature or request label May 6, 2024
@k9withabone k9withabone added this to the v0.3.0 milestone May 6, 2024
@k9withabone k9withabone linked an issue May 6, 2024 that may be closed by this pull request
24 tasks
@tdgroot
Copy link

tdgroot commented May 6, 2024

Nice to see that features are added without breaking podman BC 👍

@k9withabone k9withabone merged commit 75a9eaa into main May 8, 2024
10 checks passed
@k9withabone k9withabone deleted the podman-v5.0.0 branch May 8, 2024 14:02
@rugk
Copy link
Contributor

rugk commented May 14, 2024

Great! But the doc in the Readme is not adjusted yet or may I be wrong?

It still says

In addition, the --pod option will generate Kubernetes YAML

And the usage/-h screen does the same:

--pod <POD>  Create a Kubernetes YAML file for a pod instead of separate containers

Should not this now say it will generate a .pod file?

@k9withabone
Copy link
Member Author

the Readme is not adjusted yet

Correct, the README is updated with releases. The next one should be this week. See the podlet-v0.3.0 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman v5.0.0
3 participants