From 9726cc4a182b36ef0f78b994f2be9116a2db7151 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 8 Jul 2022 10:26:01 +0200 Subject: [PATCH] Fix and comment empty-dirs + volume-from --- doc/docs/labels.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/docs/labels.md b/doc/docs/labels.md index 728e8e5..2f19a69 100644 --- a/doc/docs/labels.md +++ b/doc/docs/labels.md @@ -99,10 +99,10 @@ services: webapp: image: nginx volumes: - - sources:/var/www/html + - websource:/var/www/html labels: # sources is actually an empty directory on the node - katenary.io/empty-dirs: sources + katenary.io/empty-dirs: websource php: image: php:7-fpm @@ -113,8 +113,9 @@ services: katenary.io/same-pod: webapp # see the corresponding section, get the volume # fro webapp - katenary.io/volume-from: - sources: webapp + katenary.io/volume-from: | + sources: + webapp: websource ``` ## volume-from @@ -126,7 +127,7 @@ services: webapp: image: nginx volumes: - - data:/var/www/html + - datasource:/var/www/html app: image: php @@ -134,7 +135,10 @@ services: - data:/opt/data labels: katenary.io/volume-from: | - data: webapp + # data in this container... + data: + # ... correspond to "datasource" in "webapp" container + webapp: datasource ``` This implies that the declared volume in "webapp" will be mounted to "app" pods.