summaryrefslogtreecommitdiff
path: root/contrib/rootless-cni-infra
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/rootless-cni-infra')
-rw-r--r--contrib/rootless-cni-infra/Containerfile2
-rw-r--r--contrib/rootless-cni-infra/README.md2
-rwxr-xr-xcontrib/rootless-cni-infra/rootless-cni-infra3
3 files changed, 5 insertions, 2 deletions
diff --git a/contrib/rootless-cni-infra/Containerfile b/contrib/rootless-cni-infra/Containerfile
index c5d812a6e..5be30ccc9 100644
--- a/contrib/rootless-cni-infra/Containerfile
+++ b/contrib/rootless-cni-infra/Containerfile
@@ -33,3 +33,5 @@ COPY --from=dnsname /dnsname /opt/cni/bin
COPY rootless-cni-infra /usr/local/bin
ENV CNI_PATH=/opt/cni/bin
CMD ["sleep", "infinity"]
+
+ENV ROOTLESS_CNI_INFRA_VERSION=1
diff --git a/contrib/rootless-cni-infra/README.md b/contrib/rootless-cni-infra/README.md
index 937e057fb..5aa13374b 100644
--- a/contrib/rootless-cni-infra/README.md
+++ b/contrib/rootless-cni-infra/README.md
@@ -16,6 +16,8 @@ Podman then allocates a CNI netns in the infra container, by executing an equiva
The allocated netns is deallocated when the container is being removed, by executing an equivalent of:
`podman exec rootless-cni-infra rootless-cni-infra dealloc $CONTAINER_ID $NETWORK_NAME`.
+The container images live on `quay.io/libpod/rootless-cni-infra`. The tags have the format `$version-$architecture`. Please make sure to increase the version number in the Containerfile (i.e., `ROOTLESS_CNI_INFRA_VERSION`) when applying changes to this directory. After committing the changes, upload the image(s) with the corresponding tag.
+
## Directory layout
* `/run/rootless-cni-infra/${CONTAINER_ID}/pid`: PID of the `sleep infinity` process that corresponds to the allocated netns
diff --git a/contrib/rootless-cni-infra/rootless-cni-infra b/contrib/rootless-cni-infra/rootless-cni-infra
index 5a574d2eb..f6622b23c 100755
--- a/contrib/rootless-cni-infra/rootless-cni-infra
+++ b/contrib/rootless-cni-infra/rootless-cni-infra
@@ -2,7 +2,6 @@
set -eu
ARG0="$0"
-VERSION="0.1.0"
BASE="/run/rootless-cni-infra"
# CLI subcommand: "alloc $CONTAINER_ID $NETWORK_NAME $POD_NAME"
@@ -126,7 +125,7 @@ cmd_entrypoint_help() {
# CLI subcommand: "version"
cmd_entrypoint_version() {
- echo "{\"version\": \"${VERSION}\"}"
+ echo "{\"version\": \"${ROOTLESS_CNI_INFRA_VERSION}\"}"
}
# parse args