ardanlabs / service

Starter-kit for writing services in Go using Kubernetes.
https://www.ardanlabs.com
Apache License 2.0
3.4k stars 612 forks source link

feat: support podman #358

Closed sudomateo closed 2 months ago

sudomateo commented 2 months ago

This patch adds support for running service using Podman. There are a few notable changes that were required to enable Podman support, described below.

Podman keeps HostIP empty instead of using 0.0.0.0. This behavior required an update to extractIPPort. More information in https://github.com/containers/podman/issues/17780.

Podman prefers to use fully-qualified container images (i.e., example.com/foo/bar:latest) but will perform short-name aliasing for unqualified container images. When an unqualified image such as foo/bar:latest is loaded into a kind cluster it will be stored as localhost/foo/bar:latest.

Using backticks for command substitution isn't POSIX compatible. Switched the backticks to $() instead to support alternative shells (e.g., /bin/fish).

ardan-bkennedy commented 2 months ago

Thank you for this. I will review in the morning. If I have questions I'll reach out.