Uploaded image for project: 'Container Tools'
  1. Container Tools
  2. RUN-3585

[containers/podman] Provide a remote API for inactive quadlets

XMLWordPrintable

      [3434812166] Upstream Reporter: Jelle van der Waa
      Upstream issue status: Closed
      Upstream description:

      Feature request description

      In Cockpit-podman we started working on supporting Quadlets as first class citizens, running quadlets are not a problem for our UI but showing inactive/stopped quadlets is.

      As inactive/stopped quadlets don't keep a container around they aren't discoverable via podman's remote API.

      Suggest potential solution

      Podman gained quadlet list which shows quadlet information but no relation between containers and pods nor the Image, Exec and ContainerName/PodName if they are overridden.

      As we already use the podman http API, adding a new endpoint there for quadlets would be our preferred solution.

      Have you considered any alternatives?

      Our alternative is parsing the .service files from /run/systemd/generator ourself and generating a JSON blob for our UI:

      {
        "pods": {
          "immich-pod.service": {
            "source_path": "/etc/containers/systemd/immich.pod",
            "name": "immich"
          },
          "has-pod.service": {
            "source_path": "/etc/containers/systemd/has.pod",
            "name": "has"
          }
        },
        "containers": {
          "pihole.service": {
            "source_path": "/etc/containers/systemd/pihole.container",
            "name": "pihole",
            "exec": "",
            "image": "docker.io/pihole/pihole:latest"
          },
          "immich-server.service": {
            "source_path": "/etc/containers/systemd/immich-server.container",
            "name": "immich_server",
            "exec": "",
            "image": "ghcr.io/immich-app/immich-server:v1.142.1",
            "pod": "immich.pod"
          },
          "zigbee2mqtt.service": {
            "source_path": "/etc/containers/systemd/zigbee2mqtt.container",
            "name": "zigbee2mqtt",
            "exec": "",
            "image": "docker.io/koenkk/zigbee2mqtt",
            "pod": "has.pod"
          },
          "mosquitto.service": {
            "source_path": "/etc/containers/systemd/mosquitto.container",
            "name": "mosquitto",
            "exec": "",
            "image": "docker.io/eclipse-mosquitto",
            "pod": "has.pod"
          },
          "immich-machine-learning.service": {
            "source_path": "/etc/containers/systemd/immich-machine-learning.container",
            "name": "immich_machine_learning",
            "exec": "",
            "image": "ghcr.io/immich-app/immich-machine-learning:v1.142.1-openvino",
            "pod": "immich.pod"
          },
          "immich-database.service": {
            "source_path": "/etc/containers/systemd/immich-database.container",
            "name": "immich_postgres",
            "exec": "",
            "image": "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a",
            "pod": "immich.pod"
          }
        }
      }
      

      Additional context

      None


      Upstream URL: https://github.com/containers/podman/issues/27119

              Unassigned Unassigned
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: