summaryrefslogtreecommitdiff
path: root/roles/apps
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-11-25 21:57:15 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-11-25 21:57:15 +0100
commita6f89b7835738c68cb597e76008b43839a5221be (patch)
tree79636ba116eadf86943f6533f765d6e7d7b33e32 /roles/apps
parentrename postfix/simple to postfix/base (diff)
extend pix.elevate.at image paths
Diffstat (limited to 'roles/apps')
-rw-r--r--roles/apps/pigallery2/defaults/main.yml4
-rw-r--r--roles/apps/pigallery2/templates/pod-spec.yml.j212
2 files changed, 11 insertions, 5 deletions
diff --git a/roles/apps/pigallery2/defaults/main.yml b/roles/apps/pigallery2/defaults/main.yml
index 3affc3fb..db34ae9a 100644
--- a/roles/apps/pigallery2/defaults/main.yml
+++ b/roles/apps/pigallery2/defaults/main.yml
@@ -17,4 +17,6 @@ pigallery2_app_gid: "970"
# hostname: gallery.example.com
# zfs_properties:
# quota: 1G
-# images_path: /path/to/images
+# images_paths:
+# example: /path/to/images
+# foo: /path/to/foo
diff --git a/roles/apps/pigallery2/templates/pod-spec.yml.j2 b/roles/apps/pigallery2/templates/pod-spec.yml.j2
index e0921b3b..c47beb6f 100644
--- a/roles/apps/pigallery2/templates/pod-spec.yml.j2
+++ b/roles/apps/pigallery2/templates/pod-spec.yml.j2
@@ -16,9 +16,11 @@ containers:
mountPath: /app/data/db
- name: tmp
mountPath: /app/data/tmp
- - name: images
- mountPath: /app/data/images
+{% for mountpoint, images_path in item.value.images_paths.items() %}
+ - name: images-{{ mountpoint }}
+ mountPath: /app/data/images/{{ mountpoint }}
readOnly: true
+{% endfor %}
env:
- name: PORT
value: "{{ item.value.port }}"
@@ -41,7 +43,9 @@ volumes:
hostPath:
path: "{{ pigallery2_base_path }}/{{ item.key }}/tmp/"
type: Directory
-- name: images
+{% for mountpoint, images_path in item.value.images_paths.items() %}
+- name: images-{{ mountpoint }}
hostPath:
- path: "{{ item.value.images_path }}"
+ path: "{{ images_path }}"
type: Directory
+{% endfor %}