Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-34606

[RHEL EPIC] Support data volume container as init containers in podman kube - RHEL 10.0 Beta

    • [RHEL EPIC] Support data volume container as init containers in podman kube - RHEL 9.5
    • Hide

      The following needs to be verified in order for this epic to be considered complete:

      • Verify that an image can be mounted as noted in the description.
      Show
      The following needs to be verified in order for this epic to be considered complete: Verify that an image can be mounted as noted in the description.
    • Red Hat Enterprise Linux
    • sst_container_tools
    • 13
    • False
    • Hide

      None

      Show
      None
    • Yes
    • QE ack, Dev ack, Docs ack, PXE ack
    • Enhancement
    • Hide
      .Kubernetes YAML now supports a data volume container as an init container

      A list of images to automatically mount as volumes can now be specified in Kubernetes YAML by using the `"io.podman.annotations.kube.image.automount/$ctrname"` annotation. Image-based mounts using `podman run --mount type=image,source=<image>,dst=<path>,subpath=<path>` now support a new option, `subpath`, to mount only part of the image into the container.
      Show
      .Kubernetes YAML now supports a data volume container as an init container A list of images to automatically mount as volumes can now be specified in Kubernetes YAML by using the `"io.podman.annotations.kube.image.automount/$ctrname"` annotation. Image-based mounts using `podman run --mount type=image,source=<image>,dst=<path>,subpath=<path>` now support a new option, `subpath`, to mount only part of the image into the container.
    • Done

      Description

      Feature Overview

      This would add --volumes-from support to podman kube support. This allows for a data management flow with an image being used to create but never start a container that is bind mounted into another container via --volumes-from.

      Related Issue: https://issues.redhat.com/browse/RHEL-24715

      PR with upstream Fix: https://github.com/containers/podman/pull/22410

      Release Note: A list of images to automatically mount as volumes can now be specified in Kubernetes YAML via the "io.podman.annotations.kube.image.automount/$ctrname" annotation. Image-based mounts using `podman run --mount type=image,...` now support a new option, `subpath`, to mount only part of the image into the container.

      Man Page Addition:

      `Automounting Volumes`

      An image can be automatically mounted into a container if the annotation `io.podman.annotations.kube.image.automount/$ctrname` is given. The following rules apply:

      • The image must already exist locally.
      • The image must have at least 1 volume directive.
      • The path given by the volume directive will be mounted from the image into the container. For example, an image with a volume at `/test/test_dir` will have `/test/test_dir` in the image mounted to `/test/test_dir` in the container.
      • Multiple images can be specified. If multiple images have a volume at a specific path, the last image specified trumps.
      • The images are always mounted read-only.
      • Images to mount are defined in the annotation "io.podman.annotations.kube.image.automount/$ctrname" as a semicolon-separated list. They are mounted into a single container in the pod, not the whole pod. The annotation can be specified for additional containers if additional mounts are required.

      This has been completed upstream.

      Goals

      Partner request.

       

              tsweeney@redhat.com Tom Sweeney
              tsweeney@redhat.com Tom Sweeney
              Container Runtime Eng Bot Container Runtime Eng Bot
              Container Runtime Bugs Bot Container Runtime Bugs Bot
              Gabriela Necasova Gabriela Necasova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: